summaryrefslogtreecommitdiff
path: root/scripts/build/bootstrap_cache
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-03-30 15:09:41 +0100
committerRaphaƫl Hertzog <hertzog@debian.org>2020-04-23 15:53:12 +0200
commit430c48640c6b5523f8da65561f62d25b6a7efbb2 (patch)
tree210b83c6a7e235e6743993fbba44d86b370a6239 /scripts/build/bootstrap_cache
parentf4c8a28a21e7edd50f01dec7450fefad4da07714 (diff)
downloadvyos-live-build-430c48640c6b5523f8da65561f62d25b6a7efbb2.tar.gz
vyos-live-build-430c48640c6b5523f8da65561f62d25b6a7efbb2.zip
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
Diffstat (limited to 'scripts/build/bootstrap_cache')
-rwxr-xr-xscripts/build/bootstrap_cache16
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/build/bootstrap_cache b/scripts/build/bootstrap_cache
index b9894fed8..a90aacdd3 100755
--- a/scripts/build/bootstrap_cache
+++ b/scripts/build/bootstrap_cache
@@ -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}"