bsh/generate-tarball.sh

25 lines
561 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)"
# RETRIEVE
2021-02-01 13:54:32 +00:00
wget "https://github.com/beanshell/beanshell/archive/${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
2018-07-30 18:41:45 +00:00
rm -rf tarball-tmp
mkdir tarball-tmp
cd tarball-tmp
2021-02-01 13:54:32 +00:00
tar xf "../${name}-${version}.orig.tar.gz"
2018-07-30 18:41:45 +00:00
# CLEAN TARBALL
rm -r */lib
2021-02-01 13:54:32 +00:00
find -name '*.jar' -print -delete
find -name '*.class' -print -delete
2018-08-03 08:32:36 +00:00
# Files marked as SUN PROPRIETARY/CONFIDENTAIL
2021-02-01 13:54:32 +00:00
rm -rv */engine/javax-src
2018-07-30 18:41:45 +00:00
2021-02-01 13:54:32 +00:00
tar cf "../${name}-${version}.tar.gz" *
2018-07-30 18:41:45 +00:00
cd ..
2021-02-01 13:54:32 +00:00
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"