beust-jcommander/generate-tarball.sh
Petr Šabata 0109060076 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/beust-jcommander#b21317f90f478274957fcd99d576594d2f630af7
2020-10-14 22:15:31 +02:00

27 lines
626 B
Bash
Executable File

#!/bin/bash
set -e
# This commit refers to the state of the sources when they were published to
# Maven Central
git_tag='dcf154b6d40dd3865e317de7250b7019044543a9'
version="$(sed -n 's/Version:\s*//p' *.spec)"
# Retrieve and set version
git clone https://github.com/cbeust/jcommander.git
pushd jcommander
git reset --hard "${git_tag}"
# Clean
find -name '*.jar' -delete
find -name '*.class' -delete
rm -rf gradle* kobalt* lib
rm -rf .git
popd
# Pack into tarball
mv jcommander beust-jcommander-"${version}"
tar -cvf beust-jcommander-"${version}".tar.gz beust-jcommander-"${version}"/
rm -rf beust-jcommander-"${version}"