Files
init.sh/modules/install_desktop.sh
2022-02-18 18:19:15 +01:00

50 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.3"
export DEP_install_desktop="upgrade_dist"
install_desktop()
{
if [[ -n $X11_DRV ]]; then
prnt I "Installing additionnal X11 drivers..."
pkginst $X11_DRV
fi
if [[ $UBUNTU_FLAVOR ]]; then
prnt I "Installing $UBUNTU_FLAVOR environment..."
pkginst ${UBUNTU_FLAVOR}-desktop
fi
set_reboot_needed
}
precheck_install_desktop()
{
if [[ -z $UBUNTU_FLAVOR ]]; then
prnt W "No Ubuntu flavor chosen, no desktop environment will be installed!"
else
prnt m " * The flavor $UBUNTU_FLAVOR will be installed..."
fi
if [[ -n $X11_DRV ]]; then
prnt W "Non free drivers will be installed."
fi
}
export -f install_desktop
export -f precheck_install_desktop
# EOF