|
|
|
#!/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='100.0.4896.60-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='d7a98777650e8218fef4acc8466d4ddf5e234b97fbc16c33f38f69f9ebfe7b6bb6827a90aad15ea729d7c1bacfa78488c5d5194b531f00f454302dd9c0957e4e'
|
|
|
|
|
|
|
|
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"
|