From d4855d1029e426bdff1e097e3dd4526cfc9e5794 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 1 Aug 2024 08:47:18 +0000 Subject: automatic import of antlr --- generate-tarball.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 generate-tarball.sh (limited to 'generate-tarball.sh') diff --git a/generate-tarball.sh b/generate-tarball.sh new file mode 100755 index 0000000..0404e77 --- /dev/null +++ b/generate-tarball.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -e + +name=antlr +version="$(sed -n 's/Version:\s*//p' *.spec)" + +# RETRIEVE +wget "http://www.antlr2.org/download/antlr-${version}.tar.gz" -O "${name}-${version}.orig.tar.gz" + +rm -rf tarball-tmp +mkdir tarball-tmp +cd tarball-tmp +tar -xf "../${name}-${version}.orig.tar.gz" + +# CLEAN TARBALL +# contain questionable things, such as csflex.exe +find -name '*.jar' -delete +find -name '*.class' -delete +find -name '*.exe' -delete +find -name '*.dll' -delete +find -name '*.so' -delete + +# rhbz#1986062 +rm "antlr-${version}/examples/java/unicode.IDENTs/StreamConverter.java" +rm "antlr-${version}/examples/java/unicode.IDENTs/ShowString.java" + +tar -czf "../${name}-${version}.tar.gz" * +cd .. +rm -r tarball-tmp "${name}-${version}.orig.tar.gz" -- cgit v1.2.3