Advertisement
MorpheusArch

Aptitude+ Smarter Package Management Shell Script

Feb 21st, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.60 KB | None | 0 0
  1. #!/bin/bash
  2. #######################################################################
  3. #This program is free software: you can redistribute it and/or modify
  4. #it under the terms of the GNU General Public License as published by
  5. #the Free Software Foundation, either version 3 of the License, or
  6. #(at your option) any later version.
  7.  
  8. #This program is distributed in the hope that it will be useful,
  9. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. #GNU General Public License for more details.
  12.  
  13. #You should have received a copy of the GNU General Public License
  14. #along with this program.  If not, see <http://www.gnu.org/licenses/>.
  15. #######################################################################
  16.  
  17. if [ $(id -u) != "0" ];then
  18.  
  19.     echo "You need to be root to update the system either become root with the su or sudo command. Or contact your system administrator"
  20.  
  21.     exit 1
  22.  
  23. fi
  24.  
  25. #########################################################################
  26.  
  27. echo "Updating aptitude...please wait"
  28.  
  29. sleep 2
  30.  
  31.     aptitude update
  32.  
  33. sleep 2
  34.  
  35. ##########################################################################
  36.  
  37. echo "Checking for and installing  available upgrades...please wait"
  38.  
  39. sleep 2
  40.  
  41.     aptitude upgrade -y
  42.  
  43. sleep 2
  44.  
  45. ###########################################################################
  46.  
  47. echo "Checking for and removing unnecesary packages...please wait"
  48.  
  49. sleep 2
  50.  
  51.     apt-get autoremove -y
  52.  
  53. sleep 2
  54.  
  55.  
  56. echo "Aptitude+ Complete"
  57.  
  58. ############################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement