add vopt_conflict helper
vopt_conflict prints an error and exits if two options are set at the same time.
This commit is contained in:
parent
62b3c65d77
commit
191c1eaf51
2 changed files with 10 additions and 0 deletions
|
@ -19,3 +19,9 @@ vopt_enable() {
|
|||
vopt_if "$1" "--enable-${flag}" "--disable-${flag}"
|
||||
}
|
||||
|
||||
vopt_conflict() {
|
||||
local opt1="$1" opt2="$2" n1="build_option_$1" n2="build_option_$2"
|
||||
if [ "${!n1}" -a "${!n2}" ]; then
|
||||
msg_error "options '${opt1}' and '${opt2}' conflict\n"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue