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; }