Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/rump_wmd * make -h actually work



details:   https://anonhg.NetBSD.org/src/rev/1b6d8bb60ca4
branches:  trunk
changeset: 326404:1b6d8bb60ca4
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Jan 28 13:58:25 2014 +0000

description:
* make -h actually work
* give usage for invalid usage

diffstat:

 usr.bin/rump_wmd/rump_wmd.sh |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r bca537b079bd -r 1b6d8bb60ca4 usr.bin/rump_wmd/rump_wmd.sh
--- a/usr.bin/rump_wmd/rump_wmd.sh      Tue Jan 28 13:56:02 2014 +0000
+++ b/usr.bin/rump_wmd/rump_wmd.sh      Tue Jan 28 13:58:25 2014 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $NetBSD: rump_wmd.sh,v 1.3 2014/01/28 13:56:02 pooka Exp $
+#      $NetBSD: rump_wmd.sh,v 1.4 2014/01/28 13:58:25 pooka Exp $
 #
 # Copyright (c) 2014 Antti Kantee <pooka%iki.fi@localhost>
 #
@@ -44,7 +44,7 @@
 }
 
 unset FIRSTLIB
-while getopts 'l:L:v' opt; do
+while getopts 'hl:L:v' opt; do
        case "${opt}" in
        l)
                : ${FIRSTLIB:=${OPTIND}}
@@ -62,6 +62,7 @@
                ;;
        esac
 done
+[ -z "${FIRSTLIB}" ] && usage
 shift $((${FIRSTLIB} - 2))
 [ $# -eq 0 ] && usage
 



Home | Main Index | Thread Index | Old Index