60ad7d
#!/bin/bash
60ad7d
set -e
60ad7d
60ad7d
name=beust-jcommander
60ad7d
version="$(sed -n 's/Version:\s*//p' *.spec)"
60ad7d
60ad7d
# RETRIEVE
60ad7d
wget "https://github.com/cbeust/jcommander/archive/${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
60ad7d
60ad7d
rm -rf tarball-tmp
60ad7d
mkdir tarball-tmp
60ad7d
cd tarball-tmp
60ad7d
tar xf "../${name}-${version}.orig.tar.gz"
60ad7d
60ad7d
# CLEAN TARBALL
60ad7d
rm -r */gradle* */kobalt* */lib
60ad7d
60ad7d
tar cf "../${name}-${version}.tar.gz" *
60ad7d
cd ..
60ad7d
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"