#!/usr/bin/env bash set -e set -u set -o pipefail # To get the latest version, see CHROME_VERSION='106.0.5249.119-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='b0c408977cb9f1bae5595fc0e8908b41c0f07cd0abe6fea66dcfbd64516feb7a729f20ede3c3c44dd6db2eeb7fd1213461f9eff3b623e72902ed273877408acf' 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"