From 6db51a0ab146799bee3ceb224a56eb4959a48890 Mon Sep 17 00:00:00 2001 From: Sylvain Roche <5450786+niavlysAO@users.noreply.github.com> Date: Tue, 23 Aug 2022 12:20:47 +0200 Subject: [PATCH] label screamingfrogspider.sh fix, dmg per arch ScreamingFrogSpider now has different dmg per CPU arch. Download page provides 2 dmg links, therefore we must fix downloadURL grep --- fragments/labels/screamingfrogseospider.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fragments/labels/screamingfrogseospider.sh b/fragments/labels/screamingfrogseospider.sh index 1a2aaf6..39ab342 100644 --- a/fragments/labels/screamingfrogseospider.sh +++ b/fragments/labels/screamingfrogseospider.sh @@ -1,7 +1,12 @@ screamingfrogseospider) name="Screaming Frog SEO Spider" type="dmg" - downloadURL=$(curl -fs "https://www.screamingfrog.co.uk/wp-content/themes/screamingfrog/inc/download-modal.php" | grep -i -o "https.*\.dmg" | head -1) + if [[ $(arch) == i386 ]]; then + platform="Mac - (intel)" + elif [[ $(arch) == arm64 ]]; then + platform="Mac - (apple silicon)" + fi + downloadURL=$(curl -fs "https://www.screamingfrog.co.uk/wp-content/themes/screamingfrog/inc/download-modal.php" | grep "${platform}" | grep -i -o "https.*\.dmg" | head -1) appNewVersion=$(print "$downloadURL" | sed -E 's/https.*\/[a-zA-Z]*-([0-9.]*)\.dmg/\1/g')".0" expectedTeamID="CAHEVC3HZC" ;;