summaryrefslogtreecommitdiffstats
path: root/src/opkbuild.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-09-21 12:11:05 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-09-21 12:11:05 (EDT)
commit3ef6f2a9b748ecde9cf8909dd1d95ef587d81c72 (patch)
tree43a126ae78eddf72e7205e8a3fe7f6275d787615 /src/opkbuild.sh
parent31a74b8f5545b1a5b702581d85e9f38333995e5f (diff)
opkbuild: Allow -B and -P to be combined
Diffstat (limited to 'src/opkbuild.sh')
-rw-r--r--src/opkbuild.sh22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index 395ee61..842acfb 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -43,6 +43,8 @@ export OPK_HOST_ARCH_LIBS=
export OPK_HOST_PLAT=
opt_build=
+opt_arch_dep=
+opt_plat_dep=
opt_target=
opt_host_arch=
opt_host_plat=
@@ -116,16 +118,18 @@ get_options()
opt_build='binary'
;;
B)
- if [ -n "${opt_build}" ]; then
- ob_error "$(ob_get_msg 'bbasf_mutex')"
- fi
- opt_build='binary-arch-dep'
+ case "${opt_build}" in ''|'binary');;
+ *) ob_error "$(ob_get_msg 'bbasf_mutex')"
+ esac
+ opt_build='binary'
+ opt_arch_dep=true
;;
P)
- if [ -n "${opt_build}" ]; then
- ob_error "$(ob_get_msg 'bbasf_mutex')"
- fi
- opt_build='binary-plat-dep'
+ case "${opt_build}" in ''|'binary');;
+ *) ob_error "$(ob_get_msg 'bbasf_mutex')"
+ esac
+ opt_build='binary'
+ opt_plat_dep=true
;;
S)
if [ -n "${opt_build}" ]; then
@@ -182,6 +186,8 @@ get_options()
[ -z "${opt_build}" ] && opt_build='full'
[ -z "${opt_check_build_deps}" ] && opt_check_build_deps='true'
[ -z "${opt_uid0_cmd}" ] && opt_uid0_cmd='fakeroot'
+ [ "x${opt_arch_dep}" = 'x' ] && opt_arch_dep=false
+ [ "x${opt_plat_dep}" = 'x' ] && opt_plat_dep=false
# Set cleaning behavior.
if [ -n "${opt_target}" ]; then