From c6c9254a9d9e6ebfd65f12b7b7f691a8f0fac3d3 Mon Sep 17 00:00:00 2001 From: G2-Games Date: Fri, 25 Nov 2022 00:35:59 -0600 Subject: [PATCH] Fixed ZSH issues, added strict mode (http://redsymbol.net/articles/unofficial-bash-strict-mode/) --- welcome.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/welcome.sh b/welcome.sh index b5c55e9..56c2e60 100755 --- a/welcome.sh +++ b/welcome.sh @@ -148,7 +148,7 @@ updates () { echo $updates >| ~/.welcome/updates pkill -P $pid sleep sleep 5 - if [ -a ~/.welcome/updates ]; then + if [[ -a ~/.welcome/updates ]]; then rm ~/.welcome/updates fi return 1 @@ -160,11 +160,11 @@ updates () { exec 3>&2 exec 2> /dev/null sleep 5 - chk=$(echo $?) &> /dev/null + chk=$(echo $?) exec 2>&3 exec 3>&- - if [ -a updates ]; then + if [[ -a updates ]]; then updates=$(cat ~/.welcome/updates) rm ~/.welcome/updates fi