From e227f77f594dd144b64eedb477e187c8f5c9659e Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sun, 21 Jan 2024 05:02:49 -0800 Subject: [PATCH] Deal with shellcheck warnings in 1993/plummer This was only in try.sh: SLEEP is not needed which is why the error was not detected. SLEEP is only relevant to the alt code. But the try.alt.sh was updated to make it shorter for assigning the default: [[ -z "$SLEEP" ]] && SLEEP=1000 1000 is the default in the Makefile. --- 1993/plummer/try.alt.sh | 4 +--- 1993/plummer/try.sh | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/1993/plummer/try.alt.sh b/1993/plummer/try.alt.sh index 9c4f532fe..5a68767cb 100755 --- a/1993/plummer/try.alt.sh +++ b/1993/plummer/try.alt.sh @@ -12,9 +12,7 @@ fi # let user change the sleep duration if they wish # -if [[ -z "$SLEEP" ]]; then - SLEEP=1000 -fi +[[ -z "$SLEEP" ]] && SLEEP=1000 # let user change the number if they wish to # diff --git a/1993/plummer/try.sh b/1993/plummer/try.sh index e1dde1689..73f2edd83 100755 --- a/1993/plummer/try.sh +++ b/1993/plummer/try.sh @@ -26,7 +26,7 @@ else ARG="$2" fi -make CC="$CC" SLEEP="$SLEEP" all >/dev/null || exit 1 +make CC="$CC" all >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear