bsh/generate-tarball.sh

26 lines
648 B
Bash
Raw Normal View History

2018-07-30 18:41:45 +00:00
#!/bin/bash
set -e
name=bsh
version="$(sed -n 's/Version:\s*//p' *.spec)"
reltag="$(sed -n 's/%global\s*reltag\s*//p' *.spec)"
# RETRIEVE
wget "https://github.com/beanshell/beanshell/archive/${version}${reltag}.tar.gz" -O "${name}-${version}-${reltag}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
cd tarball-tmp
tar xf "../${name}-${version}-${reltag}.orig.tar.gz"
# CLEAN TARBALL
rm -r */lib
find -name '*.jar' -delete
find -name '*.class' -delete
2018-08-03 08:32:36 +00:00
# Files marked as SUN PROPRIETARY/CONFIDENTAIL
rm -r */engine/javax-src
2018-07-30 18:41:45 +00:00
tar cf "../${name}-${version}-${reltag}.tar.gz" *
cd ..
rm -r tarball-tmp "${name}-${version}-${reltag}.orig.tar.gz"