diff --git a/common/environment/setup/options.sh b/common/environment/setup/options.sh index 948de79a9e1..83e0f9420f9 100644 --- a/common/environment/setup/options.sh +++ b/common/environment/setup/options.sh @@ -30,10 +30,8 @@ vopt_conflict() { } vopt_bool() { - local opt="$1" prop="$2" - if [ "$#" -lt "2" ]; then - msg_error "vopt_bool : 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"