Created
November 16, 2017 16:53
-
-
Save mikeabreu/39e38fca083ed8740ad1933353974f1e to your computer and use it in GitHub Desktop.
This file contains 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 | |
############################################################################### | |
# Author: Mike Abreu | |
############################################################################### | |
main() { | |
display_message $CBLUE "[*] System Update Starting." | |
display_message $CORANGE "[+] Updating Aptitude Repositories:${CGREEN} sudo apt-get update" | |
sudo apt-get update | |
display_message $CORANGE "[+] Upgrading Installed Packages:${CGREEN} sudo apt-get upgrade -y --show-progress" | |
sudo apt-get upgrade -y --show-progress | |
display_message $CORANGE "[+] Upgrading Distrubution Packages:${CGREEN} sudo apt-get dist-upgrade -y --show-progress" | |
sudo apt-get dist-upgrade -y --show-progress | |
display_message $CORANGE "[+] Erase Old Downloaded Archives:${CGREEN} sudo apt-get autoclean -y" | |
sudo apt-get autoclean -y | |
display_message $CORANGE "[+] Removing Unused Packages:${CGREEN} sudo apt-get autoremove -y --show-progress" | |
sudo apt-get autoremove -y --show-progress | |
display_message $CBLUE "[*] System Update Finished." | |
} | |
############################################################################### | |
add_terminal_colors() { | |
CE="\033[0m"; | |
CT="\033[38;5;";CRED="${CT}9m";CGREEN="${CT}28m";CBLUE="${CT}27m" | |
CORANGE="${CT}202m";CYELLOW="${CT}226m";CPURPLE="${CT}53m" | |
CB="\033[48;5;";CBRED="${CB}9m";CBGREEN="${CB}28m";CBBLUE="${CB}27m" | |
CBORANGE="${CB}202m";CBYELLOW="${CB}226m";CBPURPLE="${CB}53m" | |
for HEX in {0..255};do eval "C$HEX"="\\\033[38\;5\;${HEX}m";done | |
for HEX in {0..255};do eval "CB${HEX}"="\\\033[48\;5\;${HEX}m";done | |
} | |
display_message() { | |
# display_message color message | |
echo -e "${1}${2}${CE}" | |
} | |
add_terminal_colors | |
main @ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment