kate.ward | 695ddde | 2008-06-26 22:22:26 +0000 | [diff] [blame^] | 1 | #!/bin/sh |
2 | |||||
3 | # source shflags | ||||
4 | . ../src/shflags | ||||
5 | |||||
6 | debug() { [ ${FLAGS_debug} -eq ${FLAGS_TRUE} ] && echo "DEBUG: $@" >&2; } | ||||
7 | |||||
8 | # define flags | ||||
9 | DEFINE_boolean 'debug' false 'enable debug mode' 'd' | ||||
10 | |||||
11 | # parse the command-line | ||||
12 | FLAGS "$@" || exit 1; shift ${FLAGS_ARGC} | ||||
13 | |||||
14 | debug 'debug mode enabled' | ||||
15 | echo 'something interesting' |