vopt_bool: use option as default property
Keep it in-line with vopt_with and vopt_enable.
This commit is contained in:
parent
63283d403c
commit
b1a6baed7f
|
@ -30,10 +30,8 @@ vopt_conflict() {
|
|||
}
|
||||
|
||||
vopt_bool() {
|
||||
local opt="$1" prop="$2"
|
||||
if [ "$#" -lt "2" ]; then
|
||||
msg_error "vopt_bool <build_option> <property>: missing values\n"
|
||||
elif [ "$#" -gt "2" ]; then
|
||||
local opt="$1" prop="${2:-$1}"
|
||||
if [ "$#" -gt "2" ]; then
|
||||
msg_error "vopt_bool $opt: $(($# - 2)) excess parameter(s)\n"
|
||||
fi
|
||||
vopt_if "$1" "-D${prop}=true" "-D${prop}=false"
|
||||
|
|
Loading…
Reference in New Issue