xbps-src: new vopt_feature helper
This commit is contained in:
parent
65435ab244
commit
5bb9d7c856
2 changed files with 13 additions and 0 deletions
|
@ -36,3 +36,11 @@ vopt_bool() {
|
|||
fi
|
||||
vopt_if "$1" "-D${prop}=true" "-D${prop}=false"
|
||||
}
|
||||
|
||||
vopt_feature() {
|
||||
local opt="$1" prop="${2:-$1}"
|
||||
if [ "$#" -gt "2" ]; then
|
||||
msg_error "vopt_feature $opt: $(($# - 2)) excess parameter(s)\n"
|
||||
fi
|
||||
vopt_if "$1" "-D${prop}=enabled" "-D${prop}=disabled"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue