Added set -uo pipefail

This commit is contained in:
oddlama 2020-04-16 23:19:33 +02:00
parent 95977f18c1
commit 00fe9bc553
No known key found for this signature in database
GPG Key ID: 88EA325D51D53908
3 changed files with 3 additions and 1 deletions

View File

@ -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'"
}

View File

@ -1,4 +1,5 @@
#!/bin/bash
set -uo pipefail
################################################
# Initialize script environment

View File

@ -1,4 +1,5 @@
#!/bin/bash
set -uo pipefail
[[ "${EXECUTED_IN_CHROOT}" != true ]] \
&& { echo "This script must not be executed directly!" >&2; exit 1; }