obosdi-pkg/install/desktop/mate-gtk3/menu
2016-11-18 00:44:05 +01:00

30 lines
800 B
Bash

#!/bin/bash
. ./lib
options=()
options+=("mate-gtk3" "")
options+=("mate-extra-gtk3" "")
defaultitem=""
sel=$(whiptail --backtitle "$apptitle" --title "Mate-GTK3 Install Menu :" --menu "" --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
'mate-gtk3')
require install/desktop/mate-gtk3/packages 755
sed -i "/^package=/c\package=\"$sel\"" install/desktop/mate-gtk3/packages
script install/desktop/mate-gtk3/packages
;;
'mate-extra-gtk3')
require install/desktop/mate-gtk3/packages 755
sed -i "/^package=/c\package=\"$sel\"" install/desktop/mate-gtk3/packages
script install/desktop/mate-gtk3/packages
;;
esac
exit 0