byte-buddy/generate-tarball.sh

23 lines
501 B
Bash
Raw Normal View History

2019-09-24 11:06:49 +00:00
#!/bin/bash
set -e
name=byte-buddy
version="$(sed -n 's/Version:\s*//p' *.spec)"
# RETRIEVE
wget "https://github.com/raphw/byte-buddy/archive/${name}-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
cd tarball-tmp
tar xf "../${name}-${version}.orig.tar.gz"
# CLEAN TARBALL
find -name '*.jar' -delete
find -name '*.class' -delete
find -name '*.zip' -delete
tar cf "../${name}-${version}.tar.gz" *
cd ..
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"