Created
March 28, 2014 00:01
-
-
Save mshuler/9821942 to your computer and use it in GitHub Desktop.
debian testing daily upgrade
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
yesno() | |
{ | |
while true; do | |
read -p "=====> Would you like to $message [Y/n]? " yn | |
case $yn in | |
''|[Yy]* ) answer="yes"; break;; | |
* ) answer="no"; exit;; | |
esac | |
done | |
} | |
echo -n "Updating apt repositories..." | |
# update quietly | |
sudo apt-get update -q2 || echo " 'apt-get update' exited abnormally.." | |
echo " Done" | |
sudo apt-get dist-upgrade -Vs | egrep -v '^Reading|^Building|^Calculating|^Inst|^Conf' | |
message="download package upgrades" | |
yesno | |
if [ "$answer" = "yes" ]; then | |
sudo apt-get dist-upgrade -Vdy | |
fi | |
message="run 'apt-get upgrade'" | |
yesno | |
if [ "$answer" = "yes" ]; then | |
sudo apt-get upgrade -Vy | |
fi | |
message="run 'apt-get dist-upgrade'" | |
yesno | |
if [ "$answer" = "yes" ]; then | |
sudo apt-get dist-upgrade -Vy | |
fi | |
message="run 'apt-get autoremove'" | |
yesno | |
if [ "$answer" = "yes" ]; then | |
sudo apt-get autoremove --purge -V | |
fi | |
echo "====== Additional Package Information ======" | |
echo "=====> 'deborphan --guess-all' output:" | |
deborphan --guess-all | |
echo "=====> 'aptitude search ~c' output:" | |
aptitude search ~c | |
echo "=====> 'aptitude search ~b' output:" | |
aptitude search ~b | |
echo "=====> 'aptitude search ~o' output:" | |
aptitude search ~o | |
echo "=====> 'aptitude search '~S~i!~Atesting'' output:" | |
aptitude search '~S~i!~Atesting' | |
echo "=====> 'aptitude search '~S~i!~ODebian'' output:" | |
aptitude search '~S~i!~ODebian' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment