removed [[ TEST ]] && action form for if [[ TEST ]]; then action; fi for compatibility

This commit is contained in:
levasseur
2021-09-08 17:52:16 +02:00
parent bec63a5304
commit d8c1dfddd6
13 changed files with 61 additions and 42 deletions

View File

@@ -101,7 +101,8 @@ read_commandline()
done
# If those var are true at that point, something is wrong
if [[ $want_logfile == true ]] || [[ $want_module == true ]] || [[ $want_conffile == true ]]; then
if [[ $want_logfile == true ]] || [[ $want_module == true ]] ||
[[ $want_conffile == true ]]; then
syntax_error
fi
}
@@ -149,28 +150,28 @@ process_commandline_and_vars()
{
# Check unconsistant parameters
if [[ $CHECK_ONLY == true ]]; then
[[ $JUMP == true ]] && (
if [[ $JUMP == true ]]; then
prnt E "Les options --check-only et --jump s'excluent mutuellement !"
die 1 --force
)
[[ $KEEPGOING == true ]] && (
fi
if [[ $KEEPGOING == true ]]; then
prnt E "Les options --keep-going et --check-only sont incompatible !"
die 1 --force
)
fi
fi
if [[ $RESUME == true ]]; then
[[ $CHECK_ONLY == true ]] && (
if [[ $CHECK_ONLY == true ]]; then
prnt E "La reprise n'a pas de sens avec --check-only."
die 1 --force
)
[[ $MANUAL_MODULE_LIST ]] && (
fi
if [[ $MANUAL_MODULE_LIST ]]; then
prnt E "Le mode reprise ne fonctionne pas avec une liste de modules passé manuellement."
die 1 --force
)
fi
fi
# Configure module list
if [[ $MANUAL_MODULE_LIST ]]; then
if [[ -n $MANUAL_MODULE_LIST ]]; then
prnt W "Une liste de modules manuelle sera utilisé."
export MODULE_LIST=$(echo $MANUAL_MODULE_LIST | sed "s/,/ /g")
fi