1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00
metamask-extension/.circleci/scripts/chrome-install.sh
seaona c246eaa8e2
Updating chromedriver to last stable version (#16310)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2022-11-02 11:14:43 +01:00

30 lines
1010 B
Bash
Executable File

#!/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='107.0.5304.87-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='07b443bc1382431da84f6812b7e19f1149aa195fb8b3d28834630cc5964fb9d12124abbf4ec1c98d5c0513cdf16c2a3f16a74518c984aaf57ca418b3cd36a4e2'
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"