-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup-zoom
executable file
·52 lines (41 loc) · 873 Bytes
/
setup-zoom
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
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash
set -euo pipefail
command_exists() {
type "${1}" >/dev/null 2>&1
}
ensure_tool() {
local -r tool="${1}"
if ! command_exists "${tool}"; then
echo "missing required tool: ${tool}"
exit 1
fi
}
setup_for_darwin() {
ensure_tool brew
echo 'cask "zoom"' | brew bundle --no-lock --file=-
}
setup_for_debian() {
ensure_tool curl
ensure_tool dpkg
local -r url="https://zoom.us/client/latest/zoom_amd64.deb"
local -r filename="$(basename "${url}")"
echo "Downloading..."
curl --progress-bar --continue-at - --output "/tmp/${filename}" -L "${url}"
echo
echo "Installing..."
sudo apt install --yes "/tmp/${filename}"
echo
echo "Done!"
}
case $OSTYPE in
darwin*)
setup_for_darwin;;
linux*)
if command_exists dpkg; then
setup_for_debian
fi
;;
*)
echo "Unknown OS!"
exit 1;;
esac