Make backend checking actually work properly
This commit is contained in:
parent
d9e4479766
commit
3883f54cdb
11
ptgdp
11
ptgdp
@ -104,12 +104,15 @@ main() {
|
||||
done < "$_optconfigfile"
|
||||
fi
|
||||
# Validate critical options
|
||||
{
|
||||
(
|
||||
for backend in ${_supportedbackends[@]}; do
|
||||
[ "$backend" = "${_config[backend]}" ] && return 0
|
||||
if [ "$backend" = "${_config[backend]}" ]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
error "Unsupported backend: ${_config[backend]}" 50
|
||||
}
|
||||
return 1
|
||||
) || error "Unsupported backend: ${_config[backend]}" 50
|
||||
|
||||
# Pre-really-do-stuff hooks like help text
|
||||
[ -n "$_opthelp" ] && printhelp && exit 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user