2021-02-03 06:45:38 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -u
|
|
|
|
set -o pipefail
|
|
|
|
|
2021-09-08 22:54:31 +02:00
|
|
|
# To get the latest version, see <https://www.ubuntuupdates.org/ppa/google_chrome?dist=stable>
|
2022-02-03 16:02:56 +01:00
|
|
|
CHROME_VERSION='97.0.4692.99-1'
|
2021-02-03 06:45:38 +01:00
|
|
|
CHROME_BINARY="google-chrome-stable_${CHROME_VERSION}_amd64.deb"
|
2021-09-01 18:40:40 +02:00
|
|
|
CHROME_BINARY_URL="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/${CHROME_BINARY}"
|
2021-06-18 18:45:58 +02:00
|
|
|
|
2021-09-08 22:54:31 +02:00
|
|
|
# To retrieve this checksum, run the `wget` and `shasum` commands below
|
2022-02-03 16:02:56 +01:00
|
|
|
CHROME_BINARY_SHA512SUM='3a97bdb9bb7a7b66188eeaff88ca6eb5bab2586225a03c4697bc075117f1f662289bc873e90001247f4addc715d86227b718e512625cc362e6d3dbc004291701'
|
2021-02-03 06:45:38 +01:00
|
|
|
|
|
|
|
wget -O "${CHROME_BINARY}" -t 5 "${CHROME_BINARY_URL}"
|
|
|
|
|
2021-06-18 18:45:58 +02:00
|
|
|
if [[ $(shasum -a 512 "${CHROME_BINARY}" | cut '--delimiter= ' -f1) != "${CHROME_BINARY_SHA512SUM}" ]]
|
|
|
|
then
|
2021-06-23 21:47:16 +02:00
|
|
|
echo "Google Chrome binary checksum did not match."
|
2021-06-18 18:45:58 +02:00
|
|
|
exit 1
|
2021-06-23 21:47:16 +02:00
|
|
|
else
|
|
|
|
echo "Google Chrome binary checksum verified."
|
2021-06-18 18:45:58 +02:00
|
|
|
fi
|
|
|
|
|
2021-02-03 06:45:38 +01:00
|
|
|
(sudo dpkg -i "${CHROME_BINARY}" || sudo apt-get -fy install)
|
|
|
|
|
|
|
|
rm -rf "${CHROME_BINARY}"
|
|
|
|
|
|
|
|
printf '%s\n' "CHROME ${CHROME_VERSION} configured"
|