tidy up vopt helpers

This commit is contained in:
Dominik Honnef 2014-09-05 16:37:08 +02:00
parent 4eae6532c3
commit 62b3c65d77
1 changed files with 2 additions and 3 deletions

View File

@ -1,8 +1,7 @@
# vim: set ts=4 sw=4 et:
vopt_if() {
local opt="$1" t="$2" f="$3"
name="build_option_$opt"
local name="build_option_$1" t="$2" f="$3"
if [ ${!name} ]; then
echo -n "$t"
else
@ -12,7 +11,7 @@ vopt_if() {
vopt_with() {
local opt="$1" flag="${2:-$1}"
vopt_if "$1" "--with-${flag}" "--without-${flag}"
vopt_if "$opt" "--with-${flag}" "--without-${flag}"
}
vopt_enable() {