From 2ad5171d8612ef7bd2964b4aa4f82afc8e2e0953 Mon Sep 17 00:00:00 2001 From: Thomas Juerges <203795-tjuerges@users.noreply.gitlab.com> Date: Tue, 25 May 2021 16:10:50 +0200 Subject: [PATCH] L2SS-225: Move set +e after the check for docker compose The reason is simple. When I check for docker-compose, the execution can fail. Then I'll check for the built-in docker compose. If set -e is active the first failure will result the script being aborted with no chance to check for the second option. --- bootstrap/sbin/rebuild_system_from_scratch.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bootstrap/sbin/rebuild_system_from_scratch.sh b/bootstrap/sbin/rebuild_system_from_scratch.sh index 8cf58c14a..640a72e53 100755 --- a/bootstrap/sbin/rebuild_system_from_scratch.sh +++ b/bootstrap/sbin/rebuild_system_from_scratch.sh @@ -1,7 +1,5 @@ #! /usr/bin/env bash -set -e - HOME_DIR=${LOFAR20_DIR:-${PWD}} if [ ! -d ${HOME_DIR}/bootstrap ]; then # HOME_DIR/bootstrap needs to exist for this script to work. @@ -25,6 +23,9 @@ else return 1 fi +# Any error should terminate this script. +set -e + # Save for the moment when tango will be cloned. OLD_HOME_DIR=${HOME_DIR}.old -- GitLab