obosdi-pkg/install/desktop/menu
2015-08-30 00:27:41 +02:00

44 lines
1.2 KiB
Bash

#!/bin/bash
. ./lib
options=()
options+=("KDE4" "")
options+=("XFCE4" "")
options+=("Gnome" "")
options+=("Plasma5" "")
options+=("LXDE" "")
options+=("Cinnamon" "")
options+=("Mate" "")
options+=("Enlightenment" "")
options+=("Openbox" "")
#options+=("LXQT" "")
#options+=("GnuStep" "")
#options+=("i3" "")
defaultitem=""
sel=$(whiptail --backtitle "$apptitle" --title "Install Desktop Menu :" --menu "First item is most maintained" --default-item "$defaultitem" --cancel-button "Back" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
sed -i "/^defaultitem=/c\defaultitem=\"$sel\"" $0
case $sel in
'Plasma5') menu install/desktop/plasma5/menu;;
'KDE4') menu install/desktop/kde4/menu;;
'XFCE4') menu install/desktop/xfce4/menu;;
'Gnome') menu install/desktop/gnome/menu;;
'LXDE')
require install/desktop/lxde/packages 755
sed -i "/^package=/c\package=\"lxde\"" install/desktop/lxde/packages
script install/desktop/lxde/packages
svcenable lxdm
;;
'Enlightenment') script install/desktop/enlightenment/packages;;
'Mate') menu install/desktop/mate/menu;;
'Cinnamon') script install/desktop/cinnamon/packages;;
'Openbox') script install/desktop/openbox/packages;;
esac
exit 0