Use set -o

This commit is contained in:
Oliver Davies 2024-05-22 08:51:04 +01:00
parent 504fb96771
commit a2ac74a796

View file

@ -4,15 +4,18 @@ if [[ "$1" == "" ]]; then
echo "Usage: ${0##*/} <script-name>"; 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}"