diff options
author | P. J. McDermott <pjm@nac.net> | 2014-02-26 21:37:11 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2014-02-26 21:37:11 (EST) |
commit | 780d42c7549512ba040638a3afaee07043a0459f (patch) | |
tree | cdc3250570ad7622955cfa00b97e7a5bd2882542 | |
parent | 5f3abe64cc0fe9c50ff0caf97bb5c6c14b31cae7 (diff) |
oh_buildsystem_arch(): Require second argument.
-rw-r--r-- | lib/buildsystem.sh | 13 | ||||
-rw-r--r-- | src/oh-architecture.sh | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/lib/buildsystem.sh b/lib/buildsystem.sh index 8207bcc..ffdba86 100644 --- a/lib/buildsystem.sh +++ b/lib/buildsystem.sh @@ -140,17 +140,18 @@ oh_buildsystem_arch() local bs_arch= local system= - if [ ${#} -eq 1 ]; then + if [ ${#} -eq 2 ]; then arch="${1}" + system="${2}" + else + return 125 + fi + + if [ "x${system}" = 'x' ]; then system="$(oh_buildsystem_find 'configure')" if [ ${?} -ne 0 ]; then return 1 fi - elif [ ${#} -eq 2 ]; then - arch="${1}" - system="${2}" - else - return 125 fi # Try to find a suitable build system host arch. diff --git a/src/oh-architecture.sh b/src/oh-architecture.sh index 4ba5929..003b625 100644 --- a/src/oh-architecture.sh +++ b/src/oh-architecture.sh @@ -48,7 +48,7 @@ main() oh_buildsystems_init - oh_buildsystem_arch "${1}" + oh_buildsystem_arch "${1}" '' } main "${@}" |