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