-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzoom-update.sh
31 lines (23 loc) · 861 Bytes
/
zoom-update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
function update_zoom() {
echo "Checking for Zoom updates..."
url="https://zoom.us/client/latest/"
file="zoom_amd64.deb"
cd ~/Downloads/Install/Software
echo "Downloading information about the latest Zoom version..."
wget -qN $url$file
downloadedVer=$(dpkg -f $file version)
echo "Latest Zoom version found: $downloadedVer"
dpkgReport=$(dpkg -s zoom)
echo "Checking Zoom installation status..."
echo "$dpkgReport" | grep '^Status: install ok' > /dev/null && \
installedVer=$(echo "$dpkgReport" | grep ^Version: | sed -e 's/Version: //')
if [ "$installedVer" != "$downloadedVer" ]; then
echo "New version of Zoom available. Updating..."
sudo dpkg -i $file
echo "New version of Zoom installed."
else
echo "Zoom is already up to date."
fi
}
update_zoom