summaryrefslogtreecommitdiffstats
path: root/src/oh-installfiles
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-01-19 21:01:48 (EST)
committer P. J. McDermott <pjm@nac.net>2012-01-19 21:02:42 (EST)
commitd6caadadcc2da77a9decd99863b801661fd30186 (patch)
tree020ee6ec861d550a001a0844a8d65e86a0a4f138 /src/oh-installfiles
parent6e05dd9a7467f146a074091be7c417b1b4ba3061 (diff)
Count arguments and fail if insufficient.
Diffstat (limited to 'src/oh-installfiles')
-rw-r--r--src/oh-installfiles5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/oh-installfiles b/src/oh-installfiles
index 89a34e4..1069192 100644
--- a/src/oh-installfiles
+++ b/src/oh-installfiles
@@ -24,6 +24,11 @@ print_usage()
printf 'Usage: %s pkgname...\n' "$1"
}
+if [ ${#} -eq 0 ]; then
+ print_usage ${0} >&2
+ exit 1
+fi
+
while [ ${#} -gt 0 ]; do
OLDIFS=${IFS}
IFS='