-
Notifications
You must be signed in to change notification settings - Fork 651
Expand file tree
/
Copy pathinstall-chrome.sh
More file actions
executable file
·29 lines (21 loc) · 1010 Bytes
/
install-chrome.sh
File metadata and controls
executable file
·29 lines (21 loc) · 1010 Bytes
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
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
# To get the latest version, see <https://www.ubuntuupdates.org/ppa/google_chrome?dist=stable>
CHROME_VERSION='125.0.6422.76-1'
CHROME_BINARY="google-chrome-stable_${CHROME_VERSION}_amd64.deb"
CHROME_BINARY_URL="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/${CHROME_BINARY}"
# To retrieve this checksum, run the `wget` and `shasum` commands below
CHROME_BINARY_SHA512SUM='b5bc4a3ae20d60bf2fa05ae332d14892b3395c538572259a03ea2baf5a9293e71af23d37794cbc40c7378f9389fa76de07124df9df90831088df1411cd30855e'
wget -O "${CHROME_BINARY}" -t 5 "${CHROME_BINARY_URL}"
if [[ $(shasum -a 512 "${CHROME_BINARY}" | cut '--delimiter= ' -f1) != "${CHROME_BINARY_SHA512SUM}" ]]
then
echo "Google Chrome binary checksum did not match."
exit 1
else
echo "Google Chrome binary checksum verified."
fi
(sudo dpkg -i "${CHROME_BINARY}" || sudo apt-get -fy install)
rm -rf "${CHROME_BINARY}"
printf '%s\n' "Chrome ${CHROME_VERSION} configured"