summaryrefslogtreecommitdiff
path: root/dist/s_typedef
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-03-04 10:34:06 -0500
committerKeith Bostic <keith@wiredtiger.com>2013-03-04 10:34:06 -0500
commitc302c412dd5338a78bc12f7e2c9dc1db8ea73774 (patch)
tree7158f31e7a584ac7236a24046897c2898902ad9d /dist/s_typedef
parent95ff7c0b248aa00a1cd32de8e136c1db85049755 (diff)
downloadmongo-c302c412dd5338a78bc12f7e2c9dc1db8ea73774.tar.gz
Complain if no argument given.
Diffstat (limited to 'dist/s_typedef')
-rw-r--r--dist/s_typedef11
1 files changed, 7 insertions, 4 deletions
diff --git a/dist/s_typedef b/dist/s_typedef
index 0969a3b1b89..78081be7160 100644
--- a/dist/s_typedef
+++ b/dist/s_typedef
@@ -54,6 +54,12 @@ check() {
test -s $t && cat $t
}
+usage()
+{
+ echo 'usage: s_typedef [-bc]' >&2
+ exit 1
+}
+test "$#" -eq 1 || usage
while :
do case "$1" in
-b) # -b builds the typedefs
@@ -63,12 +69,9 @@ while :
check
shift;;
*)
+ test "$#" -eq 0 || usage
break;;
esac
done
-test "$#" -eq 0 || {
- echo 'usage: s_typedef [-bc]' >&2
- exit 1
-}
exit 0