easymock/generate-tarball.sh

24 lines
534 B
Bash
Raw Normal View History

2018-07-31 08:48:54 +00:00
#!/bin/bash
set -e
name=easymock
version="$(sed -n 's/Version:\s*//p' *.spec)"
# RETRIEVE
wget "https://github.com/${name}/${name}/archive/${name}-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
2020-01-27 15:21:37 +00:00
pushd tarball-tmp
2018-07-31 08:48:54 +00:00
tar xf "../${name}-${version}.orig.tar.gz"
# CLEAN TARBALL
find -name '*.jar' -delete
find -name '*.class' -delete
# Contains minified js of uncertain origin
rm -r */website
2020-01-27 15:21:37 +00:00
tar -czf "../${name}-${version}.tar.gz" *
popd
2018-07-31 08:48:54 +00:00
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"