Guest User

Untitled

a guest
Nov 18th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. #!/bin/bash
  2. ###############################################################################
  3. # Author: Mike Abreu
  4. ###############################################################################
  5. main() {
  6. display_message $CBLUE "[*] System Update Starting."
  7.  
  8. display_message $CORANGE "[+] Updating Aptitude Repositories:${CGREEN} sudo apt-get update"
  9. sudo apt-get update
  10.  
  11. display_message $CORANGE "[+] Upgrading Installed Packages:${CGREEN} sudo apt-get upgrade -y --show-progress"
  12. sudo apt-get upgrade -y --show-progress
  13.  
  14. display_message $CORANGE "[+] Upgrading Distrubution Packages:${CGREEN} sudo apt-get dist-upgrade -y --show-progress"
  15. sudo apt-get dist-upgrade -y --show-progress
  16.  
  17. display_message $CORANGE "[+] Erase Old Downloaded Archives:${CGREEN} sudo apt-get autoclean -y"
  18. sudo apt-get autoclean -y
  19.  
  20. display_message $CORANGE "[+] Removing Unused Packages:${CGREEN} sudo apt-get autoremove -y --show-progress"
  21. sudo apt-get autoremove -y --show-progress
  22.  
  23. display_message $CBLUE "[*] System Update Finished."
  24. }
  25. ###############################################################################
  26. add_terminal_colors() {
  27. CE="\033[0m";
  28. CT="\033[38;5;";CRED="${CT}9m";CGREEN="${CT}28m";CBLUE="${CT}27m"
  29. CORANGE="${CT}202m";CYELLOW="${CT}226m";CPURPLE="${CT}53m"
  30. CB="\033[48;5;";CBRED="${CB}9m";CBGREEN="${CB}28m";CBBLUE="${CB}27m"
  31. CBORANGE="${CB}202m";CBYELLOW="${CB}226m";CBPURPLE="${CB}53m"
  32. for HEX in {0..255};do eval "C$HEX"="\\\033[38\;5\;${HEX}m";done
  33. for HEX in {0..255};do eval "CB${HEX}"="\\\033[48\;5\;${HEX}m";done
  34. }
  35. display_message() {
  36. # display_message color message
  37. echo -e "${1}${2}${CE}"
  38. }
  39. add_terminal_colors
  40. main @
Add Comment
Please, Sign In to add comment