Please try this out and give me some feedback on what you think of it. My goal behind this project was I wanted to update my system on boot, but I was having trouble getting CLI apps to do that, so I decided to make a GUI app do that. So, it is in a .deb, but if you just want to run the source, make sure you have /usr/lib/simpleupdate an existing directory. I just recommend installing the .deb but w/e.
And if you just want to see the source.
- Code: Select all
#! /bin/sh
# Licensed under GPLv2
DATE=$(date +%y.%m.%d.%H.%M)
if ! $(zenity --question --width=400 --height=80 --window-icon=/usr/lib/simpleupdate/simpleupdate.png --title "SimpleUpdate" --text "Ok to update system?") ; then
echo No ; else
(apt-get update) | zenity --progress --pulsate --width=400 --height=80 --window-icon=/usr/lib/simpleupdate/simpleupdate.png --title "SimpleUpdate" --text "Updating repositories..." --auto-close
apt-get dist-upgrade > /usr/lib/simpleupdate/log/$DATE.sup
(echo fin) | zenity --text-info --title "SimpleUpdate - Info" --window-icon=/usr/lib/simpleupdate/simpleupdate.png --width=550 --filename=/usr/lib/simpleupdate/log/$DATE.sup
(apt-get -q=9 dist-upgrade) | zenity --progress --pulsate --width=400 --height=80 --window-icon=/usr/lib/simpleupdate/simpleupdate.png --title "SimpleUpdate" --text "Performing dist upgrade..." --auto-close
(apt-get autoclean
apt-get clean
apt-get autoremove
rm -R /root/.local/share/Trash/files
rm -R /home/*/.local/share/Trash/files) | zenity --progress --pulsate --width=400 --height=80 --window-icon=/usr/lib/simpleupdate/simpleupdate.png --title "SimpleUpdate" --text "Removing old and new downloaded archives,\nremoving old dependancies, removing root and user trash..." --auto-close
if ! $(zenity --info --title "SimpleUpdate" --text "System Updated!\nView /usr/lib/simpleupdate/log/$DATE.sup for log.") ; then
echo No ; else
echo Finished
fi
fi
Again, please tell me what you think of it. Thanks





