From 00fe9bc553927287caef7e39db7481889fc72187 Mon Sep 17 00:00:00 2001 From: oddlama Date: Thu, 16 Apr 2020 23:19:33 +0200 Subject: [PATCH] Added set -uo pipefail --- scripts/functions.sh | 2 +- scripts/main.sh | 1 + scripts/main_chroot.sh | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/functions.sh b/scripts/functions.sh index 54be20b..f44be58 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -359,5 +359,5 @@ gentoo_chroot() { EXECUTED_IN_CHROOT=true \ TMP_DIR=$TMP_DIR \ exec chroot -- "$ROOT_MOUNTPOINT" "$GENTOO_INSTALL_REPO_DIR/scripts/main_chroot.sh" "$@" \ - || die "Failed to chroot into '$ROOT_MOUNTPOINT'" + || die "Failed to chroot into '$ROOT_MOUNTPOINT'" } diff --git a/scripts/main.sh b/scripts/main.sh index 17290ee..1415997 100755 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -uo pipefail ################################################ # Initialize script environment diff --git a/scripts/main_chroot.sh b/scripts/main_chroot.sh index 29a3568..9de21cc 100755 --- a/scripts/main_chroot.sh +++ b/scripts/main_chroot.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -uo pipefail [[ "${EXECUTED_IN_CHROOT}" != true ]] \ && { echo "This script must not be executed directly!" >&2; exit 1; }