testng/generate-tarball.sh
Mikolaj Izdebski bd64975b42 Bootstrap Maven as non-modular packages
Resolves: rhbz#1951482
2021-06-08 20:28:34 +02:00

23 lines
568 B
Bash
Executable File

#!/bin/bash
set -e
name=testng
version="$(sed -n 's/Version:\s*//p' *.spec)"
upstream_version="$(echo ${version} | tr '~' '-')"
# RETRIEVE
wget "https://github.com/cbeust/testng/archive/${upstream_version}.tar.gz" -O "${name}-${upstream_version}.orig.tar.gz"
rm -rf tarball-tmp
mkdir tarball-tmp
pushd tarball-tmp
tar -xf "../${name}-${upstream_version}.orig.tar.gz"
# CLEAN TARBALL
rm -r */gradle* */kobalt*
rm */src/main/resources/org/testng/jquery-*.js
tar -czf "../${name}-${version}.tar.gz" *
popd
rm -r tarball-tmp "${name}-${upstream_version}.orig.tar.gz"