summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-09-21 12:20:18 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-09-21 12:20:18 (EDT)
commit46e2f54b7fac437dba1d41bc0bc926e8c18dc4d2 (patch)
tree89f67794d298a753cb369795ffbe7f45b7d1a62b /src
parent5df3204432e585018eeea8c61640747553179114 (diff)
opkbuild: Use case constructs for -b, -S, and -F
Diffstat (limited to 'src')
-rw-r--r--src/opkbuild.sh18
1 files changed, 9 insertions, 9 deletions
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)