Fix authydesktop downloadURL

Checks for redirect_url and replaces space to be urlencoded
This commit is contained in:
fleish
2022-01-14 11:55:02 -08:00
committed by GitHub
parent 69372e4929
commit d470867c10

View File

@@ -1,7 +1,7 @@
authydesktop)
name="Authy Desktop"
type="dmg"
downloadURL="https://electron.authy.com/download?channel=stable&arch=x64&platform=darwin&version=latest&product=authy"
downloadURL=$(curl -s -w '%{redirect_url}' -o /dev/null "https://electron.authy.com/download?channel=stable&arch=x64&platform=darwin&version=latest&product=authy" | sed 's/\ /%20/g')
appNewVersion="$(curl -sfL --output /dev/null -r 0-0 "${downloadURL}" --remote-header-name --remote-name -w "%{url_effective}\n" | grep -o -E '([a-zA-Z0-9\_.%-]*)\.(dmg|pkg|zip|tbz)$' | sed -E 's/.*-([0-9.]*)\.dmg/\1/g')"
expectedTeamID="9EVH78F4V4"
;;