#! /bin/bash if [ ! -e .hgtags ]; then echo "ERROR: run this from the root of the repository" exit 1 fi tmpfile=/tmp/greptags$$.log trap cleanup 2 cleanup() { rm -f $tmpfile exit 1 } exitcode=0 grep -v -E -e ' jdk-[0-9]+(\.[0-9]+){0,3}\+[0-9]+$' -e ' [0-9]+(\.[0-9]+){0,3}-b[0-9]+$' -e ' [0-9]+u[0-9]+-b[0-9]+$' .hgtags > $tmpfile if [ $? -eq 0 ]; then exitcode=1 echo "ERROR: illegal tags found" echo "" cat $tmpfile fi rm -f $tmpfile exit $exitcode