forked from chadit/dotfiles_old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_zoom.sh
executable file
·42 lines (32 loc) · 934 Bytes
/
install_zoom.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
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# zoom Setup
func ()
{
local SCRIPTUSER=${SUDO_USER}
local FILETAR="zoom_x86_64.tar.xz"
local UNTARFOLDERNAME="zoom"
local INSTALLPATH="/usr/zoom"
local SOURCEURL="https://zoom.us/client/latest/zoom_x86_64.tar.xz"
# setup folders
if [ ! -f ${INSTALLPATH} ]; then
sudo mkdir -p ${INSTALLPATH}
fi
if test "$SCRIPTUSER" = "" || test "$SCRIPTUSER" = "root"; then
SCRIPTUSER=${USER}
fi
echo "user set to $SCRIPTUSER"
# change directory to tmp
cd /tmp/
# Download the sources if file does not exist
if [ ! -f /tmp/${FILETAR} ]; then
sudo wget ${SOURCEURL}
fi
# unpack tar
sudo tar -xvf ${FILETAR}
# Install to /usr/local
sudo rsync -av ${UNTARFOLDERNAME}/ ${INSTALLPATH}/
sudo chmod +x /usr/zoom/RegisterProtocol/RegisterProtocol.sh
sudo /usr/zoom/RegisterProtocol/RegisterProtocol.sh
sudo rm -rf zoom*
}
func