453d4f
#!/bin/bash
453d4f
set -e
453d4f
453d4f
name=jsoup
453d4f
version="$(sed -n 's/Version:\s*//p' *.spec)"
453d4f
453d4f
# RETRIEVE
453d4f
wget "https://github.com/jhy/${name}/archive/${name}-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
453d4f
453d4f
rm -rf tarball-tmp
453d4f
mkdir tarball-tmp
453d4f
pushd tarball-tmp
453d4f
tar -xf "../${name}-${version}.orig.tar.gz"
453d4f
453d4f
# CLEAN TARBALL
453d4f
# contains scraped news articles (non-free)
453d4f
rm -r "${name}-${name}-${version}/src/test/resources"
453d4f
453d4f
tar -czf "../${name}-${version}.tar.gz" *
453d4f
popd
453d4f
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"