forked from snwh/ubuntu-post-install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchrome
executable file
·46 lines (44 loc) · 1 KB
/
chrome
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
#!/bin/bash
# Install Chrome
function download_chrome {
# Variables
NAME="Google Chrome (${@^})"
PACKAGE=google-chrome-$@_current
REMOTE="https://dl.google.com/linux/direct"
# Download and install remote package
install_remote_package "$NAME" $PACKAGE $REMOTE install_thirdparty
status=1
}
# Google Chrome
function install_chrome {
status="0"
NAME="Google Chrome"
while [ "$status" -eq 0 ]; do
VERSION=$(eval `resize` && whiptail \
--title "$NAME" \
--radiolist "Which version of $NAME would you like to install?" \
--ok-button "Install" \
--cancel-button "Go Back" \
$LINES $COLUMNS $(( $LINES - 12 )) \
"stable" "Stable build" ON \
"beta" "Beta build" OFF \
"unstable" "Unstable build" OFF \
3>&1 1>&2 2>&3)
# Change to lower case and remove spaces.
case "${VERSION}" in
stable)
download_chrome stable;
;;
beta)
download_chrome beta;
;;
unstable)
download_chrome unstable;
;;
# return
*) status=1
install_thirdparty
;;
esac
done
}