move script param capture to before arg processing
makes them consistent with other similar script-specific param handling; saves the arg processing from dealing with it. Gbp-Dch: Short
This commit is contained in:
parent
f4c8a28a21
commit
430c48640c
|
@ -18,6 +18,14 @@ set -e
|
|||
DESCRIPTION="Cache bootstrap stage"
|
||||
USAGE="${PROGRAM} [--force]"
|
||||
|
||||
_ACTION="${1}"
|
||||
shift
|
||||
|
||||
if ! In_list "${_ACTION}" restore save; then
|
||||
Echo_error "Invalid action parameter"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Processing arguments and configuration files
|
||||
Init_config_data "${@}"
|
||||
|
||||
|
@ -28,14 +36,6 @@ if ! In_list "bootstrap" ${LB_CACHE_STAGES}; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
_ACTION="${1}"
|
||||
shift
|
||||
|
||||
if ! In_list "${_ACTION}" restore save; then
|
||||
Echo_error "Invalid action parameter"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set non-default stage file name
|
||||
# Note, this (plus the applicable extension added below) must match that used in `bootstrap_debootstrap`
|
||||
STAGE_FILE="bootstrap_cache.${_ACTION}"
|
||||
|
|
|
@ -18,6 +18,9 @@ set -e
|
|||
DESCRIPTION="Cache chroot stage"
|
||||
USAGE="${PROGRAM} [--force]"
|
||||
|
||||
_ACTION="${1}"
|
||||
shift
|
||||
|
||||
# Processing arguments and configuration files
|
||||
Init_config_data "${@}"
|
||||
|
||||
|
@ -26,9 +29,6 @@ then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
_ACTION="${1}"
|
||||
shift
|
||||
|
||||
# Set non-default stage file name
|
||||
# Setting to default name with appended action name
|
||||
STAGE_FILE="$(Stagefile_name "${_ACTION}")"
|
||||
|
|
Loading…
Reference in New Issue