cadb93
#!/bin/bash
cadb93
cadb93
if [ $# -ne 1 ]; then
cadb93
    echo "Usage: ./create-tarball.sh VERSION"
cadb93
    exit 1
cadb93
fi
cadb93
cadb93
VERSION=${1}
cadb93
NAME="junit"
cadb93
cadb93
wget https://github.com/${NAME}-team/${NAME}/archive/r${VERSION}.tar.gz
cadb93
tar xvf r${VERSION}.tar.gz
cadb93
cadb93
(
cadb93
  cd ${NAME}-r${VERSION}
cadb93
  find . -name "*.jar" -delete
cadb93
  find . -name "*.class" -delete
cadb93
)
cadb93
cadb93
tar czvf ${NAME}-${VERSION}-clean.tar.gz ${NAME}-r${VERSION}
cadb93
rm -Rf ${NAME}-${VERSION}.tar.gz
cadb93