diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2007-11-07 20:30:35 +0100 |
---|---|---|
committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2007-11-07 20:30:35 +0100 |
commit | 3546f47f810519c0b28743901c85da38cac4ba7e (patch) | |
tree | 89acbb920aaa3af49ed4d9785175ee5f8ce66788 | |
parent | f370c1b989c2c3a92a733764d62b421ddb97d558 (diff) | |
download | ndim-git-utils-3546f47f810519c0b28743901c85da38cac4ba7e.tar.gz ndim-git-utils-3546f47f810519c0b28743901c85da38cac4ba7e.tar.xz ndim-git-utils-3546f47f810519c0b28743901c85da38cac4ba7e.zip |
Nicer git-buildmsg --help output
-rw-r--r-- | git-buildmsg/git-buildmsg.in | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/git-buildmsg/git-buildmsg.in b/git-buildmsg/git-buildmsg.in index c717161..e4fb512 100644 --- a/git-buildmsg/git-buildmsg.in +++ b/git-buildmsg/git-buildmsg.in @@ -50,11 +50,21 @@ outfile="-" print_example=false srcdir="$(pwd)" +# Help messages +USAGE="[<option>...]" +LONG_USAGE="\ + -h --help Print this help message. + -V --version Print version number. + + -x --example Print complete example program. + -o --output FILENAME Set output file name. + -s --srcdir DIRNAME Set source tree dir name." + # Parse command line parameter, affecting defaults while [ "x$1" != "x" ] do case "$1" in - --example) + -x|--example) print_example=: ;; -o|--output) @@ -70,12 +80,16 @@ do exit 1 fi ;; - --version) + -V|--version) echo "$self (@PACKAGE_NAME@) @PACKAGE_VERSION@" exit ;; - --help) - echo "Supported params: --help, --example, -o|--output" + -h|--help) + echo "Usage: ${self} $USAGE" + if test "x$LONG_USAGE" = "x"; then :; + else + echo "$LONG_USAGE" + fi exit ;; -s|--srcdir) |