From da1fab116139150db562eb2c104dea55b7535a33 Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Sat, 2 May 2020 13:41:01 +0100 Subject: output error for incorrect action in chroot prep scripts ...alongside printing usage (which is perhaps unnecessary), so that it is actually clear to users that a problem occurred, and what. and capture it before option processing of remaining args. Gbp-Dch: Ignore --- scripts/build/chroot_tmpfs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/build/chroot_tmpfs') diff --git a/scripts/build/chroot_tmpfs b/scripts/build/chroot_tmpfs index c5f69ed50..93fec81c3 100755 --- a/scripts/build/chroot_tmpfs +++ b/scripts/build/chroot_tmpfs @@ -18,6 +18,9 @@ set -e DESCRIPTION="Use tmpfs to speedup the build" USAGE="${PROGRAM} {install|remove} [--force]" +_ACTION="${1}" +shift + # Processing arguments and configuration files Init_config_data "${@}" @@ -29,7 +32,7 @@ fi # Requiring stage file Require_stagefiles config bootstrap -case "${1}" in +case "${_ACTION}" in install) Echo_message "Configuring tmpfs for /var/lib/dpkg" @@ -69,6 +72,7 @@ case "${1}" in ;; *) + Echo_error "Invalid action parameter: '${_ACTION}'" Usage --fail ;; esac -- cgit v1.2.3