I know there will be many different ways to do the same thing but here is what is working for me at this time. Please feel free to modify and hack the heck out of this to suit your needs.
Create an empty text file named 'update'. Or simply issue the command 'touch update' to create the file then place the text below inside of it. Save the file then issue the command
sudo chmod +x update
to make it executable. Once that is done simply run the file by typing ./update
Code: Select all
#!/bin/bash
clear
echo "============================="
echo "= U P D A T E M E N U ="
echo "============================="
echo "1. Full System Update/Upgrade"
echo "2. Clean APT Packages"
echo "3. Install balenaEtcher"
echo "4. Install Favorite Software"
echo "5. Exit/Quit"
echo "============================="
read -p "Enter Selection: " nmbr
if [ $nmbr -eq 1 ]
then
sudo apt update
sudo apt full-upgrade
clear
echo "System Updated - Returning to Menu"
sleep 3s
clear
./update
exit
elif [ $nmbr -eq 2 ]
then
sudo apt autoclean
sudo apt autoremove
clear
echo "System Cleaned - Returning to Menu"
sleep 3s
clear
./update
exit
elif [ $nmbr -eq 3 ]
then
curl -1sLf \
'https://dl.cloudsmith.io/public/balena/etcher/setup.deb.sh' \
| sudo -E bash
sudo apt-get update
sudo apt-get install balena-etcher-electron
clear
echo "Etcher Installed - Returning to Menu"
sleep 3s
clear
./update
exit
elif [ $nmbr -eq 4 ]
then
sudo apt install stacer calibre kdenlive \
krita libreoffice scribus virtualbox inkscape gimp \
gparted gufw vlc simplescreenrecorder handbrake \
audacity git bleachbit
clear
echo "Packages Installed - Returning to Menu"
sleep 3s
clear
./update
exit
elif [ $nmbr -eq 5 ]
then
clear
exit
break
else
echo "Please select a number from the menu"
sleep 3s
clear
fi
./update