Skip to content

Instantly share code, notes, and snippets.

@fillup
Created October 13, 2021 20:18
Show Gist options
  • Save fillup/4e5fb36ecacf8383f982c7b06a390d1d to your computer and use it in GitHub Desktop.
Save fillup/4e5fb36ecacf8383f982c7b06a390d1d to your computer and use it in GitHub Desktop.
Upgrade Zoom on Linux
#!/bin/bash
# Make sure there is no zoom .deb around
touch /tmp/zoom_amd64.deb
rm /tmp/zoom_amd64.deb
# Grab the current one
wget -O /tmp/zoom_amd64.deb https://zoom.us/client/latest/zoom_amd64.deb
ISINSTALLED=`dpkg -l | grep "ii zoom" | wc -l`
KNOWN=`dpkg-query -W zoom | cut -f2 -d' '`
CURRENT=`dpkg -f /tmp/zoom_amd64.deb | grep Version | cut -f2 -d' '`
echo -n "Known: $KNOWN ("
if [ "$ISINSTALLED" == "0" ]; then
echo -n "not "
fi
echo "installed)"
echo "Current: $CURRENT"
if [[ "$KNOWN" == "$CURRENT" && "$ISINSTALLED" == "1" ]]; then
echo "The current version is installed."
else
echo "Need super user privileges to install.."
sudo dpkg -i /tmp/zoom_amd64.deb
echo -n "Zoom has been "
if [ "$ISINSTALLED" == "0" ]; then
echo "installed."
else
echo "upgraded."
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment