diff --git a/ptgdp b/ptgdp index d85499f..5adcf05 100755 --- a/ptgdp +++ b/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