From 98a89dd0fa340e852f7a5633d2d68885c0e52219 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 20 Sep 2022 10:27:10 +0200 Subject: [PATCH] Use "set -o nounset" in bash scripts * admin/automerge: * admin/make-manuals: * admin/update-copyright: * admin/update_autogen: * admin/upload-manuals: Use "set -o nounset". --- admin/automerge | 2 ++ admin/make-manuals | 2 ++ admin/update-copyright | 2 ++ admin/update_autogen | 2 ++ admin/upload-manuals | 1 + 5 files changed, 9 insertions(+) diff --git a/admin/automerge b/admin/automerge index 99191867367..c7c17dfb5ec 100755 --- a/admin/automerge +++ b/admin/automerge @@ -35,6 +35,8 @@ ## it with the -d option in the repository directory, in case a pull ## updates this script while it is working. +set -o nounset + die () # write error to stderr and exit { [ $# -gt 0 ] && echo "$PN: $*" >&2 diff --git a/admin/make-manuals b/admin/make-manuals index 8085412cc8a..cb0c00a423f 100755 --- a/admin/make-manuals +++ b/admin/make-manuals @@ -33,6 +33,8 @@ ### Code: +set -o nounset + die () # write error to stderr and exit { [ $# -gt 0 ] && echo "$PN: $@" >&2 diff --git a/admin/update-copyright b/admin/update-copyright index 5a04847a661..8b7c05749d0 100755 --- a/admin/update-copyright +++ b/admin/update-copyright @@ -31,6 +31,8 @@ # updated and some should not be, due to registration numbers, so # this script leaves these copyright years alone for now. +set -o nounset + : ${UPDATE_COPYRIGHT_USE_INTERVALS=1} export UPDATE_COPYRIGHT_USE_INTERVALS diff --git a/admin/update_autogen b/admin/update_autogen index 24513671712..8bfbdc92e9a 100755 --- a/admin/update_autogen +++ b/admin/update_autogen @@ -32,6 +32,8 @@ ### Code: +set -o nounset + die () # write error to stderr and exit { [ $# -gt 0 ] && echo "$PN: $@" >&2 diff --git a/admin/upload-manuals b/admin/upload-manuals index 1b7950ede80..50336ee64c0 100755 --- a/admin/upload-manuals +++ b/admin/upload-manuals @@ -36,6 +36,7 @@ ### Code: +set -o nounset die () # write error to stderr and exit { -- 2.39.2