From ec9a6cfbcb3dfdaad2624e236b184d23edb9c40e Mon Sep 17 00:00:00 2001 From: maximilionus Date: Wed, 26 Jun 2024 00:27:39 +0300 Subject: [PATCH] Improve "if" syntax --- run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index f0456fa..1a2ff2b 100755 --- a/run.sh +++ b/run.sh @@ -37,7 +37,7 @@ echo "Web wrapper for $NAME." TMP_DIR=$( mktemp -d ) -if [ ! -d "$TMP_DIR" ]; then +if [[ ! -d $TMP_DIR ]]; then echo "[!] Failed to initialize temporary directory." exit 1 fi @@ -47,7 +47,7 @@ trap 'rm -rf -- "$TMP_DIR" && echo "[+] Temporary directory $TMP_DIR wiped."' EX cd "$TMP_DIR" download_url="" -if [ -z "$VERSION" ]; then +if [[ -z $VERSION ]]; then echo "[+] Preparing the latest release." download_url=$(curl $CURL_FLAGS "$DOWNLOAD_LATEST_URL" \