From 46e2f54b7fac437dba1d41bc0bc926e8c18dc4d2 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 21 Sep 2014 12:20:18 -0400 Subject: opkbuild: Use case constructs for -b, -S, and -F --- (limited to 'src') diff --git a/src/opkbuild.sh b/src/opkbuild.sh index ad22429..dfa3f40 100644 --- a/src/opkbuild.sh +++ b/src/opkbuild.sh @@ -112,9 +112,9 @@ get_options() while getopts 'bBPSFT:a:p:DdCcr:hV' opt; do case "${opt}" in b) - if [ -n "${opt_build}" ]; then - ob_error "$(ob_get_msg 'bsf_mutex')" - fi + case "${opt_build}" in ''|'binary');; *) + ob_error "$(ob_get_msg 'bsf_mutex')";; + esac opt_build='binary' ;; B) @@ -132,15 +132,15 @@ get_options() opt_plat_dep=true ;; S) - if [ -n "${opt_build}" ]; then - ob_error "$(ob_get_msg 'bsf_mutex')" - fi + case "${opt_build}" in ''|'source');; *) + ob_error "$(ob_get_msg 'bsf_mutex')";; + esac opt_build='source' ;; F) - if [ -n "${opt_build}" ]; then - ob_error "$(ob_get_msg 'bsf_mutex')" - fi + case "${opt_build}" in ''|'full');; *) + ob_error "$(ob_get_msg 'bsf_mutex')";; + esac opt_build='full' ;; T) -- cgit v0.9.1