# ------------------------------------------------------------------------------ # Since Ubuntu install snapd version of Chromium and we don't want that # we need a special procedure to install Debian Buster version. # Consequently that module is *Ubuntu centric. # This file is part of the init.sh project # Copyright (c) 2019-2022 Geoffray Levasseur # ------------------------------------------------------------------------------ # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # https://opensource.org/licenses/BSD-3-Clause # ------------------------------------------------------------------------------ # Variable: # none # ------------------------------------------------------------------------------ export VER_install_chromium="0.1.0" export DEP_install_chromium="upgrade_dist" install_chromium() { # Add Debian repo to sources.list.d directory depending on Ubuntu version case $SYS_VER in 16.04|16.10|17.04|17.10) prnt I "Adding Debian Stretch repository to software sources..." install_file debian_stretch.list /etc/apt/sources.list.d/ ;; 18.04|18.10|19.04|19.10) prnt I "Adding Debian Buster repository to software sources..." install_file debian_buster.list /etc/apt/sources.list.d/ ;; 20.04|20.10|21.04|21.10) prnt I "Adding Debian Bullseye repository to software sources..." install_file debian_bullseye.list /etc/apt/sources.list.d/ ;; esac # Install Debian GPG keys apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DCC9EFBF77E11517 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 112695A0E562B32A # Install package manager conf file for Chromium install_file apt_chromium.conf /etc/apt/preferences.d/ tag_file /etc/apt/preferences.d/apt_chromium.conf # Update package list and install prnt I "Mise à jour de la liste des dépots..." pkgupt prnt I "Installation de Chromium..." pkginst chromium } precheck_install_chromium() { # Check we run Ubuntu if [[ $SYS_DIST != "ubuntu" ]]; then prnt E "The install_chromium module is a Ubuntu only workaround." die 165 fi case $SYS_VER in 16.04|16.10|17.04|17.10) prnt m " * Detected Ubuntu $SYS_VER, will install Stretch version of Chromium" ;; 18.04|18.10|19.04|19.10) prnt m " * Detected Ubuntu $SYS_VER, will install Buster version of Chromium" ;; 20.04|20.10|21.04|21.10) prnt m " * Detected Ubuntu $SYS_VER, will install Bullseye version of Chromium" ;; *) prnt E "Unable to determine the corresponding Debian version." die 165 ;; esac } export -f install_chromium export -f precheck_install_chromium # EOF