From e5d309a9d9ec8a000b920a2f4966f6b4b21b6df9 Mon Sep 17 00:00:00 2001 From: Theile Date: Wed, 14 Sep 2022 16:19:57 +0200 Subject: [PATCH] Minor correction to the `if` statement --- fragments/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index cec20b2..85a7902 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -163,7 +163,7 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name if [ -n "$archiveName" ]; then downloadURL=https://github.com$(curl -sfL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*$archiveName" | head -1) - if [[ "$(echo $downloadURL | grep -ioE "https.*.$filetype")" == "" ]]; then + if [[ "$(echo $downloadURL | grep -ioE "https.*$archiveName")" == "" ]]; then printlog "Trying GitHub API for download URL." downloadURL=$(curl -sfL "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }") fi