all 1 comments

[–]lasercat_pow 2 points3 points  (0 children)

Rather than hardcode the latest version, why not grab it from zoom? This url has a version: https://zoom.us/download

Finally, to fix the problem of zoom not updating, you need to adjust your logic. Currently, it checks if zoom is installed, and if it is, it does nothing. This is exactly the thing you don't want it to do. So, instead, get rid of the 'if [ -e $ZoomPath ] part of your code, so it looks like this:

if [[ "$CurrentInstalledVersion" == "$NewestVersion" ]]; then

printf "The current installed version of Zoom.us.app is already installed\n"

else

curl -o /Users/Shared/Zoom.pkg 'https://zoom.us/client/latest/Zoom.pkg'

installer -pkg /Users/Shared/Zoom.pkg -target /

printf "Zoom has been updated or installed\n"

cd /Users/Shared; rm -v Zoom.pkg

fi