21 lines
436 B
Bash
Executable File
21 lines
436 B
Bash
Executable File
#!/bin/bash -ex
|
|
|
|
VERSION="$(sed -n 's/Version:\s*//p' *.spec)"
|
|
SRCDIR=mockito-${VERSION}
|
|
|
|
git clone https://github.com/mockito/mockito.git ${SRCDIR}
|
|
pushd $SRCDIR
|
|
git archive --format=tar --prefix=${SRCDIR}/ v${VERSION} > ../${SRCDIR}.tar
|
|
popd
|
|
|
|
rm -rf ${SRCDIR}
|
|
|
|
tar -xf ${SRCDIR}.tar
|
|
rm ${SRCDIR}.tar
|
|
pushd ${SRCDIR}
|
|
find -name '*.jar' -delete
|
|
rm -rf gradlew gradlew.bat src/javadoc
|
|
popd
|
|
|
|
tar -cvJf mockito-${VERSION}.tar.xz ${SRCDIR}
|