debian 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 "Debian installer v1.1" \
  16. --title "Menu" \
  17. --clear \
  18. --cancel-label "Exit" \
  19. --menu "Please select:" $HEIGHT $WIDTH 4 \
  20. "1" "Inspect" \
  21. "2" "Update" \
  22. "3" "Install" \
  23. 2>&1 1>&3)
  24. exit_status=$?
  25. exec 3>&-
  26. case $exit_status in
  27. $DIALOG_CANCEL)
  28. clear
  29. echo "Program terminated."
  30. exit
  31. ;;
  32. $DIALOG_ESC)
  33. clear
  34. echo "Program aborted." >&2
  35. exit 1
  36. ;;
  37. esac
  38. case $selection in
  39. 1 )
  40. vim debian
  41. ;;
  42. 2 )
  43. sudo apt update
  44. sudo apt upgrade
  45. ;;
  46. 3 )
  47. sudo apt install abiword abook acpi alsa-tools alsa-utils arc-theme bash-completion bc btop calcurse cargo cmus curl dunst dvtm ethtool feh firefox-esr flashrom fonts-jetbrains-mono galculator gh gnumeric gufw htop hw-probe inxi jgmenu lxappearance lxappearance-obconf minitube mpv neofetch nextcloud-desktop nextcloud-desktop-cmd obconf openbox papirus-icon-theme pcmanfm picom pulseaudio python3-pip ranger redshift redshift-gtk rofi rust-all scribus scrot slim smartmontools sxhkd thunderbird tint2 tlp tlp-rdw transset udiskie ueberzug ufw unzip usbutils vifm vim wget xdg-user-dirs xdg-user-dirs-gtk xdg-utils xinit xorg xserver-xorg-input-synaptics xterm yubioath-desktop zathura-pdf-poppler
  48. ;;
  49. esac
  50. done