2020-10-14 20:30:30 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
name=bsh
|
|
|
|
version="$(sed -n 's/Version:\s*//p' *.spec)"
|
|
|
|
|
|
|
|
# RETRIEVE
|
2021-02-06 11:26:48 +00:00
|
|
|
wget "https://github.com/beanshell/beanshell/archive/${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
|
2020-10-14 20:30:30 +00:00
|
|
|
|
|
|
|
rm -rf tarball-tmp
|
|
|
|
mkdir tarball-tmp
|
|
|
|
cd tarball-tmp
|
2021-02-06 11:26:48 +00:00
|
|
|
tar xf "../${name}-${version}.orig.tar.gz"
|
2020-10-14 20:30:30 +00:00
|
|
|
|
|
|
|
# CLEAN TARBALL
|
|
|
|
rm -r */lib
|
2021-02-06 11:26:48 +00:00
|
|
|
find -name '*.jar' -print -delete
|
|
|
|
find -name '*.class' -print -delete
|
2020-10-14 20:30:30 +00:00
|
|
|
# Files marked as SUN PROPRIETARY/CONFIDENTAIL
|
2021-02-06 11:26:48 +00:00
|
|
|
rm -rv */engine/javax-src
|
2020-10-14 20:30:30 +00:00
|
|
|
|
2021-02-06 11:26:48 +00:00
|
|
|
tar cf "../${name}-${version}.tar.gz" *
|
2020-10-14 20:30:30 +00:00
|
|
|
cd ..
|
2021-02-06 11:26:48 +00:00
|
|
|
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"
|