From a2ac74a7967afe28086b050fb420226bece855a5 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 22 May 2024 08:51:04 +0100 Subject: [PATCH] Use `set -o` --- bin/create-script | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/create-script b/bin/create-script index 93aa863..5f821f4 100755 --- a/bin/create-script +++ b/bin/create-script @@ -4,15 +4,18 @@ if [[ "$1" == "" ]]; then echo "Usage: ${0##*/} "; exit 2 fi -set -ueo pipefail +set -o errexit +set -o nounset +set -o pipefail cat > "${1}" << EOF #!/usr/bin/env bash -set -euo pipefail - +set -o errexit +set -o nounset +set -o pipefail +echo "${1}" EOF chmod +x "${1}" -vim "${1}"