# ------------------------------------------------------------------------------ # Install desktop environment -- Ubuntu only # Debian version might ask for task-$FLAVOR # Copyright (c) 2019-2021 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: # * UBUNTU_FLAVOR: Kind of Ubuntu desktop installation (ubuntu for Gnome3, # xubuntu for XFCE, kubuntu for KDE/Plasma, ubuntu-mate for Mate, leave # empty for no desktop or manual) # * X11_DRV: Used to install proprietary driver for X.org (eg: nvidia-drivers) # ------------------------------------------------------------------------------ export VER_install_desktop="0.0.2" install_desktop() { [[ $X11_DRV ]] && prnt I "Installation de pilotes supplémentaires X11..." && pkginst $X11_DRV [[ $UBUNTU_FLAVOR ]] && prnt I "Installation de l'environnement $UBUNTU_FLAVOR..." && pkginst ${UBUNTU_FLAVOR}-desktop } precheck_install_desktop() { if [[ -z $UBUNTU_FLAVOR ]]; then prnt W "Pas de saveur Ubuntu choisie, aucun environnement de bureau ne sera installé !" else prnt m "La saveur $UBUNTU_FLAVOR sera installée..." fi if [[ -n $X11_DRV ]]; then prnt W "Des pilotes non libres seront installé." fi } export -f install_desktop export -f precheck_install_desktop