61071d
#!/bin/bash
61071d
set -e
61071d
61071d
name=easymock
61071d
version="$(sed -n 's/Version:\s*//p' *.spec)"
61071d
61071d
# RETRIEVE
61071d
wget "https://github.com/${name}/${name}/archive/${name}-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
61071d
61071d
rm -rf tarball-tmp
61071d
mkdir tarball-tmp
61071d
cd tarball-tmp
61071d
tar xf "../${name}-${version}.orig.tar.gz"
61071d
61071d
# CLEAN TARBALL
61071d
find -name '*.jar' -delete
61071d
find -name '*.class' -delete
61071d
# Contains minified js of uncertain origin
61071d
rm -r */website
61071d
61071d
tar cf "../${name}-${version}.tar.gz" *
61071d
cd ..
61071d
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"