From d6caadadcc2da77a9decd99863b801661fd30186 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 19 Jan 2012 21:01:48 -0500 Subject: Count arguments and fail if insufficient. --- (limited to 'src') 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=' diff --git a/src/oh-strip b/src/oh-strip index 06e1d92..e3ae500 100644 --- a/src/oh-strip +++ b/src/oh-strip @@ -58,6 +58,11 @@ if [ -z "${is_lib}" ]; then is_lib=false fi +if [ ${#} -eq 0 ]; then + print_usage ${0} >&2 + exit 1 +fi + while [ ${#} -gt 0 ]; do if ${make_dbg_pkg}; then objcopy --only-keep-debug "dest/${1}" "dest/usr/lib/debug/${1}" -- cgit v0.9.1