obosdi-pkg/install/xorg/menu

34 lines
917 B
Text
Raw Normal View History

2015-08-20 14:37:06 -06:00
#!/bin/bash
. ./lib
options=()
2016-04-03 15:38:58 -06:00
options+=("GPU Infos" "")
2015-08-20 14:37:06 -06:00
options+=("Install" "")
options+=("Fonts" "")
options+=("Input Drivers" "")
options+=("Video Drivers" "")
#options+=("Complements" "")
defaultitem=""
2022-11-10 14:27:23 -07:00
sel=$(dialog --backtitle "$apptitle" --title "XOrg Install Menu" --default-item "$defaultitem" --cancel-button "Back" --menu "" 0 0 0 \
2015-08-20 14:37:06 -06:00
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
sed -i "/^defaultitem=/c\defaultitem=\"$sel\"" $0
case $sel in
2016-04-03 15:38:58 -06:00
'GPU Infos')
gpus=$(lspci | grep -e VGA -e 3D)
2022-11-10 14:27:23 -07:00
dialog --backtitle "$apptitle" --title "Detected video card" --msgbox "$gpus" 0 0
2016-04-03 15:38:58 -06:00
;;
2015-08-20 14:37:06 -06:00
'Install') script install/xorg/install;;
'Fonts') menu install/xorg/fonts/menu;;
'Input Drivers') script install/xorg/input-drivers/input-drivers;;
'Video Drivers') menu install/xorg/video-drivers/menu;;
2015-08-20 14:37:06 -06:00
'Complements') script install/xorg/complements/complements;;
esac
exit 0