This file now has a usage() function and complains against unknown command

line options
This commit is contained in:
Laurent Rineau
2011-03-03 15:45:36 +00:00
parent 9dc0e5715b
commit 5ae2f38ef5
@@ -16,19 +16,28 @@ VERSION=1.1
DO_RUN="y"
usage()
{
echo 'Usage : create_cgal_test_with_cmake [--no-run]'
echo
echo ' --help : prints this usage help'
echo ' --no-run : produces a cgal_test_with_cmake script that only does compilation, no execution'
exit
}
while [ $1 ]; do
case "$1" in
-h|-help|--h|--help)
echo 'Usage : create_cgal_test_with_cmake [--no-run]'
echo
echo ' --help : prints this usage help'
echo ' --no-run : produces a cgal_test_with_cmake script that only does compilation, no execution'
exit
usage;
;;
--no-run)
DO_RUN=""
shift; continue
;;
*)
echo "Unknown option: $1"
usage
;;
esac
done