From 103c7243a2d50dd46c0b5efefdc2e1b1d24e30e0 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 29 May 2007 16:53:15 -0400 Subject: Get --help and --version options working on all scripts Added the autoconf option std-options to the scripts/ directory, which checks to ensure all programs have both --help and --version options. A few things needed cleaning up to get this working. To test these types of options, use the 'make distcheck' target. Signed-off-by: Dan McGee --- scripts/makeworld.in | 88 ++++++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'scripts/makeworld.in') diff --git a/scripts/makeworld.in b/scripts/makeworld.in index 8783fc9d..ca5b7261 100644 --- a/scripts/makeworld.in +++ b/scripts/makeworld.in @@ -58,7 +58,7 @@ version() { printf "Copyright (C) 2002-2007 Judd Vinet .\n" echo printf "This is free software; see the source for copying conditions.\n" - printf "There is NO WARRANTY, to the extent permitted by the law.\n" + printf "There is NO WARRANTY, to the extent permitted by law.\n" echo } @@ -83,53 +83,53 @@ for arg in $*; do --nobuild) MAKEPKG_OPTS="$MAKEPKG_OPTS -o" ;; --nocolor) MAKEPKG_OPTS="$MAKEPKG_OPTS -m" ;; --help) - usage - exit 0 - ;; + usage + exit 0 + ;; --version) - version - exit 0 - ;; + version + exit 0 + ;; --*) - usage - exit 1 - ;; + usage + exit 1 + ;; -*) - while getopts "chisSbdfrBCemoSV-" opt; do - case $opt in - c) MAKEPKG_OPTS="$MAKEPKG_OPTS -c" ;; - i) MAKEPKG_OPTS="$MAKEPKG_OPTS -i" ;; - s) MAKEPKG_OPTS="$MAKEPKG_OPTS -s" ;; - b) MAKEPKG_OPTS="$MAKEPKG_OPTS -b" ;; - d) MAKEPKG_OPTS="$MAKEPKG_OPTS -d" ;; - f) MAKEPKG_OPTS="$MAKEPKG_OPTS -f" ;; - r) MAKEPKG_OPTS="$MAKEPKG_OPTS -r" ;; - B) MAKEPKG_OPTS="$MAKEPKG_OPTS -B" ;; - C) MAKEPKG_OPTS="$MAKEPKG_OPTS -C" ;; - e) MAKEPKG_OPTS="$MAKEPKG_OPTS -e" ;; - m) MAKEPKG_OPTS="$MAKEPKG_OPTS -m" ;; - o) MAKEPKG_OPTS="$MAKEPKG_OPTS -o" ;; - S) MAKEPKG_OPTS="$MAKEPKG_OPTS -S" ;; - h) - usage - exit 0 - ;; - V) - version - exit 0 - ;; - -) - OPTIND=0 - break - ;; - esac - done - ;; + while getopts "chisSbdfrBCemoSV-" opt; do + case $opt in + c) MAKEPKG_OPTS="$MAKEPKG_OPTS -c" ;; + i) MAKEPKG_OPTS="$MAKEPKG_OPTS -i" ;; + s) MAKEPKG_OPTS="$MAKEPKG_OPTS -s" ;; + b) MAKEPKG_OPTS="$MAKEPKG_OPTS -b" ;; + d) MAKEPKG_OPTS="$MAKEPKG_OPTS -d" ;; + f) MAKEPKG_OPTS="$MAKEPKG_OPTS -f" ;; + r) MAKEPKG_OPTS="$MAKEPKG_OPTS -r" ;; + B) MAKEPKG_OPTS="$MAKEPKG_OPTS -B" ;; + C) MAKEPKG_OPTS="$MAKEPKG_OPTS -C" ;; + e) MAKEPKG_OPTS="$MAKEPKG_OPTS -e" ;; + m) MAKEPKG_OPTS="$MAKEPKG_OPTS -m" ;; + o) MAKEPKG_OPTS="$MAKEPKG_OPTS -o" ;; + S) MAKEPKG_OPTS="$MAKEPKG_OPTS -S" ;; + h) + usage + exit 0 + ;; + V) + version + exit 0 + ;; + -) + OPTIND=0 + break + ;; + esac + done + ;; *) - dest=$arg - shift - break - ;; + dest=$arg + shift + break + ;; esac shift if [ "$dest" != "" ]; then -- cgit v1.2.3-70-g09d2