#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
    sudo bash "$BASH_SOURCE";
else
    wget https://dl-ssl.google.com/linux/linux_signing_key.pub -O /tmp/google.pub;
    gpg --no-default-keyring --keyring /etc/apt/keyrings/google-chrome.gpg --import /tmp/google.pub;

    echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main' \
        | sudo tee /etc/apt/sources.list.d/google-chrome.list;

    apt update;
    apt install -y google-chrome-stable;
fi