tidy up vopt helpers
This commit is contained in:
parent
4eae6532c3
commit
62b3c65d77
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue