mockito/generate-tarball.sh

25 lines
539 B
Bash
Raw Normal View History

2020-09-30 14:23:44 +00:00
#!/bin/bash
set -e
name=mockito
version="$(sed -n 's/Version:\s*//p' *.spec)"
# RETRIEVE
wget "https://github.com/mockito/mockito/archive/v${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
pushd tarball-tmp
tar -xf "../${name}-${version}.orig.tar.gz"
# CLEAN TARBALL
2023-09-01 13:09:50 +00:00
pushd "mockito-${version}"
2020-09-30 14:23:44 +00:00
find -name '*.jar' -delete
find -name '*.class' -delete
rm -rf gradlew gradlew.bat src/javadoc
2023-09-01 13:09:50 +00:00
popd
2020-09-30 14:23:44 +00:00
tar -czf "../${name}-${version}.tar.gz" *
popd
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"