bsh/generate-tarball.sh
Petr Šabata 996286cd02 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/bsh#07f54b87562962e3c5c92c2a93484af16fb167da
2020-10-14 22:30:30 +02:00

26 lines
648 B
Bash
Executable File

#!/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
# Files marked as SUN PROPRIETARY/CONFIDENTAIL
rm -r */engine/javax-src
tar cf "../${name}-${version}-${reltag}.tar.gz" *
cd ..
rm -r tarball-tmp "${name}-${version}-${reltag}.orig.tar.gz"