mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-14 21:03:08 +00:00
Minor change if archiveName is used
Only return the last URL, if more lines are returned on the `archiveName` grep.
This commit is contained in:
@@ -160,7 +160,7 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name
|
||||
|
||||
if [ -n "$archiveName" ]; then
|
||||
#downloadURL=$(curl -L --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }")
|
||||
downloadURL=https://github.com$(curl -sL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -o "\/$gitusername\/$gitreponame.*$archiveName.*")
|
||||
downloadURL=https://github.com$(curl -sL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -o "\/$gitusername\/$gitreponame.*$archiveName.*" | tail -1)
|
||||
else
|
||||
#downloadURL=$(curl -L --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }")
|
||||
downloadURL=https://github.com$(curl -sL "https://github.com/$gitusername/$gitreponame/releases/latest" | tr '"' "\n" | grep -o "\/$gitusername\/$gitreponame.*\.$filetype")
|
||||
|
||||
Reference in New Issue
Block a user