Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Paste Description for null

/bin/gupd

null
Thursday, May 3rd, 2012 at 1:56:37am MDT 

  1. #!/bin/bash
  2. #gentoo update script
  3. #Copyright 2009 by andy
  4. choice=$1
  5.  
  6. su -c '
  7. while [ "$choice" != "0" ]; do
  8.         echo -e " ";
  9.         echo -e "\033[01;31m1)\033[01;32m -= Update portage tree =-\033[01;00m";
  10.         echo -e "\033[01;31m2)\033[01;32m -= Update your system =-\033[01;00m";
  11.         echo -e "\033[01;31m3)\033[01;32m -= Remove obsoleted packages =-\033[01;00m";
  12.         echo -e "\033[01;31m4)\033[01;32m -= Rebuild removed packages =-\033[01;00m";
  13.         echo -e "\033[01;31m5)\033[01;32m -= Clean distfiles =-\033[01;00m";
  14.         echo -e "\033[01;31m0)\033[01;32m -= Exit =-\033[01;00m";
  15.  
  16.         read choice
  17.  
  18.         if [ $choice ]; then
  19.                 case $choice in
  20.                 1)      echo -e "\033[01;32m-= Updating portage tree =-\033[01;00m";
  21.                         emerge -v --sync;
  22.                         echo -e "\033[01;32m-= Portage tree updated successfully =-\033[01;00m";;
  23.                 2)      echo -e "\033[01;32m-= Updating your system =-\033[01;00m";
  24.                         emerge -avtDuN world;
  25.                         echo -e "\033[01;32m-= System updated successfully =-\033[01;00m";;
  26.                 3)      echo -e "\033[01;32m-= Removing obsoleted packages =-\033[01;00m";
  27.                         emerge -pv --depclean;
  28.                         echo -e "\033[01;32m-= Obsoleted packages removed successfully =-\033[01;00m";;
  29.                 4)      echo -e "\033[01;32m-= Rebuilding removed packages =-\033[01;00m";
  30.                         revdep-rebuild;
  31.                         echo -e "\033[01;32m-= Removed packages rebuilded successfully =-\033[01;00m";;
  32.                 5)      echo -e "\033[01;32m-= Cleaning distfiles =-\033[01;00m";
  33.                         eclean -d distfiles;
  34.                         rm -f /usr/portage/distfiles/* ;
  35.                         echo -e "\033[01;32m-= Distfiles cleaned successfully =-\033[01;00m";;
  36.                 0)      echo -e "\033[01;32m-= Exiting =-\033[01;00m";;
  37.                 *)      echo -e "\033[01;32m-= Wrong choice, choose again =-\033[01;00m";;
  38.                 esac
  39.         fi
  40. done'

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right
fantasy-obligation