From 3ef6f2a9b748ecde9cf8909dd1d95ef587d81c72 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 21 Sep 2014 12:11:05 -0400 Subject: opkbuild: Allow -B and -P to be combined --- (limited to 'src/opkbuild.sh') 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 -- cgit v0.9.1