Update zoom.sh

This commit is contained in:
wattsy74
2021-09-29 18:58:21 +01:00
parent b65168168f
commit ad2c5e6848

10
zoom.sh
View File

@@ -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}"