cairo-perf-diff: Fix implementation of --help

Previously only "--" would givethe usage, and not "--help"
as intended. The new approach has been tested with ash, bash,
and dash, (hopefully that's good enough).
This commit is contained in:
Carl Worth 2007-04-19 11:26:47 -07:00
parent a8d4fed67a
commit ef5611df6c

View file

@ -49,7 +49,7 @@ END
}
# Yes, this ugly ad-hoc option parsing could be cleaned up
if [ $# -eq 0 ] || [ "$1" = "--" ]; then
if [ $# -eq 0 ] || [ "${1#-}" != "$1" ]; then
usage
fi