From cd2637d30f417bf9043310c1619465042e47a3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Tue, 13 Sep 2022 09:05:04 +0200 Subject: [PATCH] =?UTF-8?q?Verify=20for=20=E2=80=9CAdobe=20Installer?= =?UTF-8?q?=E2=80=9D=20before=20running?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also added another option for getting current version that we could consider using. Removed some old stuff already commented out. --- fragments/labels/adobecreativeclouddesktop.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fragments/labels/adobecreativeclouddesktop.sh b/fragments/labels/adobecreativeclouddesktop.sh index 54eabdb..c83da57 100644 --- a/fragments/labels/adobecreativeclouddesktop.sh +++ b/fragments/labels/adobecreativeclouddesktop.sh @@ -1,15 +1,19 @@ adobecreativeclouddesktop) name="Adobe Creative Cloud" - #appName="Install.app" type="dmg" + if pgrep -q "Adobe Installer"; then + printlog "Adobe Installer is running, not a good time to update." WARN + printlog "################## End $APPLICATION \n\n" INFO + exit 75 + fi adobeurl="https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" if [[ $(arch) == "arm64" ]]; then downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'macarm64')][contains(text(),'Download')]/@href)" - 2> /dev/null) elif [[ $(arch) == "i386" ]]; then downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'osx10')][contains(text(),'Download')]/@href)" - 2> /dev/null) fi - #downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*dmg" | head -1) appNewVersion=$(curl -fs "https://helpx.adobe.com/creative-cloud/release-note/cc-release-notes.html" | grep "mandatory" | head -1 | grep -o "Version *.* released" | cut -d " " -f2) + #appNewVersion=$(echo "$downloadURL" | grep -o '[^x]*$' | cut -d '.' -f 1 | sed 's/_/\./g') installerTool="Install.app" CLIInstaller="Install.app/Contents/MacOS/Install" CLIArguments=(--mode=silent)