47 lines
1.7 KiB
Bash
47 lines
1.7 KiB
Bash
# ------------------------------------------------------------------------------
|
|
# Install desktop environment -- Ubuntu only
|
|
# Debian version might ask for task-$FLAVOR
|
|
# This file is part of the init.sh project
|
|
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
|
|
# ------------------------------------------------------------------------------
|
|
# 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"
|
|
export DEP_install_desktop="upgrade_dist"
|
|
|
|
install_desktop()
|
|
{
|
|
if [[ -n $X11_DRV ]]; then
|
|
prnt I "Installation de pilotes supplémentaires X11..."
|
|
pkginst $X11_DRV
|
|
fi
|
|
if [[ $UBUNTU_FLAVOR ]]; then
|
|
prnt I "Installation de l'environnement $UBUNTU_FLAVOR..."
|
|
pkginst ${UBUNTU_FLAVOR}-desktop
|
|
fi
|
|
}
|
|
|
|
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
|