tidy up vopt helpers
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
# vim: set ts=4 sw=4 et:
|
# vim: set ts=4 sw=4 et:
|
||||||
|
|
||||||
vopt_if() {
|
vopt_if() {
|
||||||
local opt="$1" t="$2" f="$3"
|
local name="build_option_$1" t="$2" f="$3"
|
||||||
name="build_option_$opt"
|
|
||||||
if [ ${!name} ]; then
|
if [ ${!name} ]; then
|
||||||
echo -n "$t"
|
echo -n "$t"
|
||||||
else
|
else
|
||||||
@@ -12,7 +11,7 @@ vopt_if() {
|
|||||||
|
|
||||||
vopt_with() {
|
vopt_with() {
|
||||||
local opt="$1" flag="${2:-$1}"
|
local opt="$1" flag="${2:-$1}"
|
||||||
vopt_if "$1" "--with-${flag}" "--without-${flag}"
|
vopt_if "$opt" "--with-${flag}" "--without-${flag}"
|
||||||
}
|
}
|
||||||
|
|
||||||
vopt_enable() {
|
vopt_enable() {
|
||||||
|
|||||||
Reference in New Issue
Block a user