From f99928105915e37361bbbdbcbbed0fd26c6a110b Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Sat, 10 Aug 2024 14:39:09 +0200 Subject: [PATCH] Remove dependency on grep in installer script --- scripts/install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 8927e1e..ae42034 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -12,7 +12,6 @@ dependencies=( uname tr awk - grep ) for dep in "${dependencies[@]}"; do @@ -79,12 +78,11 @@ else fi # Check if the release was fetched successfully -if [ -z "$RELEASE_JSON_DATA" ] || echo "$RELEASE_JSON_DATA" | grep -q "Not Found"; then +if [ -z "$RELEASE_JSON_DATA" ] || [[ "$RELEASE_JSON_DATA" == *"Not Found"* ]]; then echo "ERROR: Latest release was not found. Please check your network connection." >&2 exit 1 fi - # Try to extract the asset url from the response by searching for a # matching asset name, and then picking the "url" that came before it read RELEASE_ASSET_ID RELEASE_ASSET_NAME <