summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-02-22 02:46:28 +0000
committerLuca Boccassi <bluca@debian.org>2020-03-10 12:39:37 +0000
commitb4598b234c90b6d1c93bd64166d4aa46ce9388bb (patch)
tree875a6cd156bb7b688b8be538dbe7345b625a7673 /scripts
parentdff08fa3f7b05be9b86e03dd8a1473b7ff41340f (diff)
downloadvyos-live-build-b4598b234c90b6d1c93bd64166d4aa46ce9388bb.tar.gz
vyos-live-build-b4598b234c90b6d1c93bd64166d4aa46ce9388bb.zip
tidy script init (4/4) - top level cmd "auto redirect" handling
Partial fix for #952919 Gbp-Dch: Short Closes: #952919
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/build12
-rwxr-xr-xscripts/build/clean12
-rwxr-xr-xscripts/build/config12
3 files changed, 9 insertions, 27 deletions
diff --git a/scripts/build/build b/scripts/build/build
index 289ed08a0..6b24d9702 100755
--- a/scripts/build/build
+++ b/scripts/build/build
@@ -17,16 +17,10 @@ set -e
Auto_build_config
# Redirecting to auto script if required
-if [ "${1}" != "noauto" ] && [ -x auto/build ]
-then
- Echo_message "Executing auto/build script."
- ./auto/build "${@}"
- exit ${?}
-fi
-
-if [ "${1}" = "noauto" ]
-then
+if [ "${1}" = "noauto" ]; then
shift
+else
+ Maybe_auto_redirect build
fi
# Setting static variables
diff --git a/scripts/build/clean b/scripts/build/clean
index ea06c0ac3..e71b7728f 100755
--- a/scripts/build/clean
+++ b/scripts/build/clean
@@ -14,16 +14,10 @@ set -e
[ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
# Redirecting to auto script if required
-if [ "${1}" != "noauto" ] && [ -x auto/clean ]
-then
- Echo_message "Executing auto/clean script."
- ./auto/clean "${@}"
- exit ${?}
-fi
-
-if [ "${1}" = "noauto" ]
-then
+if [ "${1}" = "noauto" ]; then
shift
+else
+ Maybe_auto_redirect clean
fi
# Setting static variables
diff --git a/scripts/build/config b/scripts/build/config
index c3905b656..fac822f28 100755
--- a/scripts/build/config
+++ b/scripts/build/config
@@ -883,16 +883,10 @@ then
fi
# Redirecting to auto script if required
-if [ "${1}" != "noauto" ] && [ -x auto/config ]
-then
- Echo_message "Executing auto/config script."
- ./auto/config "${@}"
- exit ${?}
-fi
-
-if [ "${1}" = "noauto" ]
-then
+if [ "${1}" = "noauto" ]; then
shift
+else
+ Maybe_auto_redirect config
fi
# Reading system configuration