diff options
author | P. J. McDermott <pjm@nac.net> | 2012-11-05 17:56:33 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-11-05 17:56:33 (EST) |
commit | d79e2e9e8627490c66ec940ea8ecd98323270817 (patch) | |
tree | 58dede7ea614667153f1cbf9f783650693f4c890 /lib | |
parent | fbadb5009d191d39c428f3e0691b8dec9f0a6d0f (diff) |
Add argument count checks to ob_*_is_concerned().
Diffstat (limited to 'lib')
-rw-r--r-- | lib/metadata.sh | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/metadata.sh b/lib/metadata.sh index d197083..c2ad84a 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -223,10 +223,15 @@ ob_arch_is_concerned() _ob_local _obaic_host_arch _obaic_arches \ _obaic_arch _obaic_not_arch _obaic_seen_arch - _obaic_host_arch="${1}" - _obaic_arches="${2}" - _obaic_seen_arch=1 + if [ ${#} -eq 2 ]; then + _obaic_host_arch="${1}" + _obaic_arches="${2}" + else + _ob_return 125 + return ${?} + fi + _obaic_seen_arch=1 if [ -z "${_obaic_arches}" ]; then _obaic_seen_arch=0 fi @@ -255,10 +260,15 @@ ob_plat_is_concerned() _ob_local _obpic_host_plat _obpic_plats \ _obpic_plat _obpic_not_plat _obpic_seen_plat - _obpic_host_plat="${1}" - _obpic_plats="${2}" - _obpic_seen_plat=1 + if [ ${#} -eq 2 ]; then + _obpic_host_plat="${1}" + _obpic_plats="${2}" + else + _ob_return 125 + return ${?} + fi + _obpic_seen_plat=1 if [ -z "${_obpic_plats}" ]; then _obpic_seen_plat=0 fi |