caching: output error on invalid action param
for bootstrap, the check is moved to the case statement for greater robustness, and for consistency with other scripts. Gbp-Dch: Ignore
This commit is contained in:
parent
da1fab1161
commit
b20979334c
|
@ -21,11 +21,6 @@ USAGE="${PROGRAM} {restore|save} [--force]"
|
||||||
_ACTION="${1}"
|
_ACTION="${1}"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if ! In_list "${_ACTION}" restore save; then
|
|
||||||
Echo_error "Invalid action parameter"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Processing arguments and configuration files
|
# Processing arguments and configuration files
|
||||||
Init_config_data "${@}"
|
Init_config_data "${@}"
|
||||||
|
|
||||||
|
@ -98,4 +93,9 @@ case "${_ACTION}" in
|
||||||
# Creating stage file
|
# Creating stage file
|
||||||
Create_stagefile "${STAGE_FILE}"
|
Create_stagefile "${STAGE_FILE}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
Echo_error "Invalid action parameter: '${_ACTION}'"
|
||||||
|
Usage --fail
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -76,4 +76,9 @@ case "${_ACTION}" in
|
||||||
# Creating stage file
|
# Creating stage file
|
||||||
Create_stagefile "${STAGE_FILE}"
|
Create_stagefile "${STAGE_FILE}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
Echo_error "Invalid action parameter: '${_ACTION}'"
|
||||||
|
Usage --fail
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue