From ad2c5e6848d34813485f5e54bd947fb71d16bf43 Mon Sep 17 00:00:00 2001 From: wattsy74 <49881777+wattsy74@users.noreply.github.com> Date: Wed, 29 Sep 2021 18:58:21 +0100 Subject: [PATCH] Update zoom.sh --- zoom.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zoom.sh b/zoom.sh index 57ebda7..1131895 100644 --- a/zoom.sh +++ b/zoom.sh @@ -27,7 +27,7 @@ dnldfile='zoom.pkg' forceQuit='Y' logfile="/Library/Logs/ZoomInstallScript.log" deplog="/var/tmp/depnotify.log" -scriptver="1.0i" +scriptver="1.0j" architecture=$(/usr/bin/arch) OSvers_URL=$( sw_vers -productVersion | sed 's/[.]/_/g' ) userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X ${OSvers_URL}) AppleWebKit/535.6.2 (KHTML, like Gecko) Version/5.2 Safari/535.6.2" @@ -58,7 +58,9 @@ fi # Get the version number of the currently-installed App, if any. if [[ -e "/Applications/${appName}.app" ]]; then - currentinstalledver=$(echo `/usr/bin/defaults read "/Applications/zoom.us.app/Contents/Info" CFBundleShortVersionString` | cut -f1 -d' ') echo "Current installed version is: $currentinstalledver" + currentinstalledlongver=`/usr/bin/defaults read "/Applications/zoom.us.app/Contents/Info" CFBundleShortVersionString` + currentinstalledver=$(echo $currentinstalledlongver | cut -f1 -d' ') + echo "Current installed version is: $currentinstalledver" echo "Current installed version is: $currentinstalledver" >> ${logfile} if [[ $latestver = $currentinstalledver ]]; then echo "${appName} is current. Exiting" @@ -118,7 +120,9 @@ fi /bin/rm /tmp/${dnldfile} #double check to see if the new version got updated - newlyinstalledver=$(echo `/usr/bin/defaults read "/Applications/zoom.us.app/Contents/Info" CFBundleShortVersionString` | cut -f1 -d' ') echo "Current installed version is: $currentinstalledver" + newlyinstalledlongver=`/usr/bin/defaults read "/Applications/zoom.us.app/Contents/Info" CFBundleShortVersionString` + newlyinstalledver=$(echo ${newlyinstalledlongver} | cut -f1 -d' ') + echo "Current installed version is: $currentinstalledver" if [[ $latestver == $newlyinstalledver ]]; then /bin/echo "`date`: SUCCESS: ${appName} has been updated to version ${newlyinstalledver}" >> ${logfile} /bin/echo "SUCCESS: ${appName} has been updated to version ${newlyinstalledver}"