aqute-bnd/generate-tarball.sh
Mikolaj Izdebski 6fb7b95c73 Bootstrap Maven as non-modular packages
Resolves: rhbz#1951482
2021-06-09 09:47:01 +02:00

32 lines
761 B
Bash
Executable File

#!/bin/bash
set -e
name=aqute-bnd
version="$(sed -n 's/Version:\s*//p' *.spec)"
# RETRIEVE
wget "https://github.com/bndtools/bnd/archive/${version}.REL.tar.gz" -O "${name}-${version}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
pushd tarball-tmp
tar -xf "../${name}-${version}.orig.tar.gz"
mv "bnd-${version}.REL" "${name}-${version}"
# CLEAN TARBALL
rm -rf "${name}-${version}/docs"
find -name '*.jar' -delete
find -name '*.class' -delete
find -name '*.ar' -delete
find -name '*.tar' -delete
find -name '*.gz' -delete
find -name '*.bz2' -delete
find -name '*.xz' -delete
find -name '*.zip' -delete
find -name '*.exe' -delete
find -name '*.dll' -delete
tar -czf "../${name}-${version}.tar.gz" *
popd
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"