Created
August 5, 2013 18:44
-
-
Save nilskoppelmann/6158332 to your computer and use it in GitHub Desktop.
Update Scripts for Debian (or Ubuntu) with various options in python and shell.
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# cc 2012 by Nils Koppelmann | |
import os | |
bold = "\033[1m" #declares the string as bold | |
reset = "\033[0;0m" #resets the string to normal | |
msg1 = "** ** ***** ****** ****** ********* *******" | |
msg2 = "** ** ** ** ******* ******** ******* **" | |
msg3 = "** ** ** ** ** ** ** ** *** *******" | |
msg4 = "** ** ***** ** ** ******** *** *******" | |
msg5 = "******* ** ******* ** ** *** **" | |
msg6 = "******* ** ****** ** ** *** *******" | |
br = "\n" | |
success = "System is now updated.\nSoftware has been updated.\nSoftware has been upgraded." | |
print(bold+br+msg1+br+msg2+br+msg3+br+msg4+br+msg5+br+msg6+br+reset) | |
os.system("sudo apt-get upgrade -y") #upgrades parts of the system | |
os.system("sudo apt-get update -y") #updates programs and drivers | |
os.system("sudo apt-get dist-upgrade -y") #distribution upgrade | |
print(bold+success+reset) #takes defined variables and prints them out | |
# just uncomment the following line(s) if you want to hear sound | |
# os.system("espeak '"+success+"' 2> /dev/null") #reads out the success message |
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/bash | |
su -c "apt-get update -y; apt-get upgrade -y; apt-get dist-upgrade -y" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment