2020-10-15 03:59:49 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
name=qdox
|
|
|
|
version="$(sed -n 's/Version:\s*//p' *.spec)"
|
|
|
|
|
|
|
|
# RETRIEVE
|
2021-06-08 18:17:56 +00:00
|
|
|
wget "https://repo1.maven.org/maven2/com/thoughtworks/qdox/qdox/${version/'~'/'-'}/${name}-${version/'~'/'-'}-project.tar.gz" -O "${name}-${version}.orig.tar.gz"
|
2020-10-15 03:59:49 +00:00
|
|
|
|
|
|
|
rm -rf tarball-tmp
|
|
|
|
mkdir tarball-tmp
|
2021-06-08 18:17:56 +00:00
|
|
|
pushd tarball-tmp
|
|
|
|
tar -xf "../${name}-${version}.orig.tar.gz"
|
2020-10-15 03:59:49 +00:00
|
|
|
|
|
|
|
# CLEAN TARBALL
|
|
|
|
find -name '*.jar' -delete
|
|
|
|
find -name '*.class' -delete
|
|
|
|
# contains possibly proprietary binaries of YACC
|
|
|
|
rm -r */bootstrap
|
|
|
|
|
2021-06-08 18:17:56 +00:00
|
|
|
tar -czf "../${name}-${version}.tar.gz" *
|
|
|
|
popd
|
2020-10-15 03:59:49 +00:00
|
|
|
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"
|