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