Blame SOURCES/generate-tarball.sh

b2fb99
#!/bin/bash
b2fb99
set -e
b2fb99
b2fb99
name=xalan-j2
b2fb99
version="$(sed -n 's/Version:\s*//p' *.spec)"
b2fb99
b2fb99
# RETRIEVE
b2fb99
wget "http://apache.miloslavbrada.cz/xalan/xalan-j/source/xalan-j_${version//./_}-src.tar.gz" -O "${name}-${version}.orig.tar.gz"
b2fb99
b2fb99
rm -rf tarball-tmp
b2fb99
mkdir tarball-tmp
b2fb99
cd tarball-tmp
b2fb99
tar xf "../${name}-${version}.orig.tar.gz"
b2fb99
b2fb99
# CLEAN TARBALL
b2fb99
find -name '*.jar' -delete
b2fb99
find -name '*.class' -delete
b2fb99
rm */src/*.tar.gz
b2fb99
b2fb99
tar cf "../${name}-${version}.tar.gz" *
b2fb99
cd ..
b2fb99
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"