3885d4
#!/bin/bash
3885d4
3885d4
if [ $# -ne 1 ]; then
3885d4
    echo "Usage: ./create-tarball.sh VERSION"
3885d4
    exit 1
3885d4
fi
3885d4
3885d4
VERSION=${1}
3885d4
NAME="jflex"
3885d4
3885d4
wget http://jflex.de/${NAME}-${VERSION}.tar.gz
3885d4
tar xvf ${NAME}-${VERSION}.tar.gz
3885d4
3885d4
(
3885d4
  cd ${NAME}-${VERSION}
3885d4
  find . -name "*.jar" -delete
3885d4
  rm -Rf src/java_cup/ examples/
3885d4
)
3885d4
3885d4
tar czvf ${NAME}-${VERSION}-clean.tar.gz ${NAME}-${VERSION}
3885d4
rm -Rf ${NAME}-${VERSION}.tar.gz ${NAME}-${VERSION}
3885d4