qdox/generate-tarball.sh

24 lines
589 B
Bash
Raw Normal View History

#!/bin/bash
set -e
name=qdox
version="$(sed -n 's/Version:\s*//p' *.spec)"
# RETRIEVE
2020-02-26 13:34:04 +00:00
wget "https://repo1.maven.org/maven2/com/thoughtworks/qdox/qdox/${version/'~'/'-'}/${name}-${version/'~'/'-'}-project.tar.gz" -O "${name}-${version}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
2020-01-27 15:23:32 +00:00
pushd tarball-tmp
2020-02-26 13:34:04 +00:00
tar -xf "../${name}-${version}.orig.tar.gz"
# CLEAN TARBALL
find -name '*.jar' -delete
find -name '*.class' -delete
# contains possibly proprietary binaries of YACC
rm -r */bootstrap
2020-01-27 15:23:32 +00:00
tar -czf "../${name}-${version}.tar.gz" *
popd
2019-09-18 12:29:42 +00:00
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"