gentoo 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. # while-menu-dialog: a menu driven system information program
  3. DIALOG_CANCEL=1
  4. DIALOG_ESC=255
  5. HEIGHT=0
  6. WIDTH=0
  7. display_result() {
  8. dialog --title "$1" \
  9. --no-collapse \
  10. --msgbox "$result" 0 0
  11. }
  12. while true; do
  13. exec 3>&1
  14. selection=$(dialog \
  15. --backtitle "Gentoo installer v1.1" \
  16. --title "Menu" \
  17. --clear \
  18. --cancel-label "Exit" \
  19. --menu "Please select:" $HEIGHT $WIDTH 4 \
  20. "1" "Inspect" \
  21. "2" "Install" \
  22. 2>&1 1>&3)
  23. exit_status=$?
  24. exec 3>&-
  25. case $exit_status in
  26. $DIALOG_CANCEL)
  27. clear
  28. echo "Program terminated."
  29. exit
  30. ;;
  31. $DIALOG_ESC)
  32. clear
  33. echo "Program aborted." >&2
  34. exit 1
  35. ;;
  36. esac
  37. case $selection in
  38. 1 )
  39. vim gentoo
  40. ;;
  41. 2 )
  42. sudo emerge -avg abiword abook acpi alsa-tools alsa-utils arc-theme bash-completion sys-devel/bc btop cmus calcurse cpuid2cpuflags curl dunst ethtool feh firefox flashrom flatpak galculator gentoolkit gnumeric htop hw-probe inxi lxappearance lxappearance-obconf menumaker mpv ncspot neofetch nextcloud-client obconf openbox papirus-icon-theme pcmanfm picom dev-python/pip pulseaudio ranger redshift resolve-march-native rofi dev-lang/rust scribus scrot x11-misc/slim smartmontools sxhkd thunderbird tint2 tlp udiskie ueberzug ufw unzip usbutils vifm vim wget xdg-user-dirs xdg-user-dirs-gtk xdg-utils xf86-input-synaptics xinit xorg-server xterm yubioath-flutter-bin zathura-pdf-poppler --autounmask-write --autounmask
  43. ;;
  44. esac
  45. done