From ddf5e6da29468684208c050967575d9eac23f165 Mon Sep 17 00:00:00 2001 From: dnikles Date: Mon, 1 Aug 2022 13:28:26 -0400 Subject: [PATCH] use getJSONValue replace sed json parsing with getJSONValue --- fragments/labels/cricutdesignspace.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fragments/labels/cricutdesignspace.sh b/fragments/labels/cricutdesignspace.sh index 486d2fe..e512bba 100644 --- a/fragments/labels/cricutdesignspace.sh +++ b/fragments/labels/cricutdesignspace.sh @@ -1,7 +1,7 @@ cricutdesignspace) name="Cricut Design Space" type="dmg" - appNewVersion=$(curl -fsL https://s3-us-west-2.amazonaws.com/staticcontent.cricut.com/a/software/osx-native/latest.json | sed -n 's/^.*"rolloutVersion"[[:space:]]*:[[:space:]]*"\([^"]*\)".*$/\1/p') - downloadURL=$(curl -fsL "https://apis.cricut.com/desktopdownload/InstallerFile?shard=a&operatingSystem=osxnative&fileName=CricutDesignSpace-Install-v${appNewVersion}.dmg" | sed -n 's/^.*"result"[[:space:]]*:[[:space:]]*"\([^"]*\)".*$/\1/p') + appNewVersion=$(getJSONValue "$(curl -fsL https://s3-us-west-2.amazonaws.com/staticcontent.cricut.com/a/software/osx-native/latest.json)" "rolloutVersion") + downloadURL=$(getJSONValue $(curl -fsL "https://apis.cricut.com/desktopdownload/InstallerFile?shard=a&operatingSystem=osxnative&fileName=CricutDesignSpace-Install-v${appNewVersion}.dmg") "result") expectedTeamID="25627ZFVT7" ;;