Module Name:    src
Committed By:   pooka
Date:           Tue Jan 28 13:58:25 UTC 2014

Modified Files:
        src/usr.bin/rump_wmd: rump_wmd.sh

Log Message:
* make -h actually work
* give usage for invalid usage


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/rump_wmd/rump_wmd.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/rump_wmd/rump_wmd.sh
diff -u src/usr.bin/rump_wmd/rump_wmd.sh:1.3 src/usr.bin/rump_wmd/rump_wmd.sh:1.4
--- src/usr.bin/rump_wmd/rump_wmd.sh:1.3	Tue Jan 28 13:56:02 2014
+++ src/usr.bin/rump_wmd/rump_wmd.sh	Tue Jan 28 13:58:25 2014
@@ -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 <[email protected]>
 #
@@ -44,7 +44,7 @@ usage ()
 }
 
 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 @@ while getopts 'l:L:v' opt; do
 		;;
 	esac
 done
+[ -z "${FIRSTLIB}" ] && usage
 shift $((${FIRSTLIB} - 2))
 [ $# -eq 0 ] && usage
 

Reply via email to