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