From 5e48b98c5c116838b3f41b1928f989da16167412 Mon Sep 17 00:00:00 2001 From: Sefinek Date: Tue, 19 Nov 2024 05:08:18 +0100 Subject: [PATCH] Bugfix for install.sh --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 40cfa28..cf1a814 100644 --- a/install.sh +++ b/install.sh @@ -55,10 +55,10 @@ download_file() { # Function to validate the API token format validate_token() { local token="$1" - if [[ ! "$token" =~ ^[a-f0-9]{80}$ ]]; then - return 1 - else + if [[ "$token" =~ ^[a-f0-9]{80}$ ]]; then return 0 + else + return 1 fi } @@ -175,7 +175,7 @@ while [[ $attempts -lt $max_attempts ]]; do fi done -if [[ "$valid_token" == false ]]; then +if [[ "$valid_token" == "false" ]]; then echo -e "\nFAIL: Maximum number of attempts reached. Installation aborted!" exit 1 fi