7fbedf3
#!/bin/bash
7fbedf3
set -e
7fbedf3
7fbedf3
name=plexus-languages
7fbedf3
version="$(sed -n 's/Version:\s*//p' *.spec)"
7fbedf3
7fbedf3
# RETRIEVE
7fbedf3
wget "https://github.com/codehaus-plexus/plexus-languages/archive/plexus-languages-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
7fbedf3
7fbedf3
rm -rf tarball-tmp
7fbedf3
mkdir tarball-tmp
7fbedf3
cd tarball-tmp
7fbedf3
tar xf "../${name}-${version}.orig.tar.gz"
7fbedf3
7fbedf3
# CLEAN TARBALL
7fbedf3
find -name '*.jar' -delete
7fbedf3
find -name '*.class' -delete
7fbedf3
7fbedf3
tar cf "../${name}-${version}.tar.gz" *
7fbedf3
cd ..
7fbedf3
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"