From 910b1c13961cbca804e3ee27bb00e93a74bc440b Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Wed, 14 Oct 2020 10:52:24 +0200 Subject: [PATCH] added bash set builtin --- bin/genwgQR | 1 + bin/initDesktop | 2 +- bin/install_codecs | 1 + bin/kubic_bootstrap.sh | 1 + bin/setupWireguard | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/genwgQR b/bin/genwgQR index 5bb3758..71d0b13 100755 --- a/bin/genwgQR +++ b/bin/genwgQR @@ -1,4 +1,5 @@ #!/bin/bash +set -aeou pipefail keepassdb="$HOME/Nextcloud/passwords/Passwords.kdbx" type qrencode >/dev/null 2>&1 || { printf "qrencode is not installed\n" >&2; exit 1; } diff --git a/bin/initDesktop b/bin/initDesktop index def1a6c..be6b97b 100755 --- a/bin/initDesktop +++ b/bin/initDesktop @@ -15,7 +15,7 @@ DOTFILES_RENAME_EXISTING_FILES=( ### NO Changes below this line -set -aeo pipefail +set -aeou pipefail function printHelp(){ cat << EOF diff --git a/bin/install_codecs b/bin/install_codecs index 93cfd53..b1555cc 100755 --- a/bin/install_codecs +++ b/bin/install_codecs @@ -1,4 +1,5 @@ #!/bin/bash +set -aeou pipefail [[ "$EUID" != 0 ]] && echo "Run as root!" && exit 1 zypper refresh zypper dist-upgrade --from packman --allow-downgrade --allow-vendor-change diff --git a/bin/kubic_bootstrap.sh b/bin/kubic_bootstrap.sh index 44c153d..051c9af 100644 --- a/bin/kubic_bootstrap.sh +++ b/bin/kubic_bootstrap.sh @@ -1,5 +1,6 @@ #!/bin/bash # to be executed in transactional-update shell +set -aeou pipefail zypper install \ vim \ jq \ diff --git a/bin/setupWireguard b/bin/setupWireguard index dae11bb..e37aea3 100755 --- a/bin/setupWireguard +++ b/bin/setupWireguard @@ -1,4 +1,5 @@ #!/bin/bash +set -aeou pipefail keepassdb="$HOME/Nextcloud/passwords/Passwords.kdbx" type wg >/dev/null 2>&1 || { printf "wireguard is not installed\n" >&2; exit 1; }