• Up-to-date script. Коментар

  • #!/bin/sh
    #Use fastest_cvsup to find fastest geographically
    #close mirror; I'll check Russion, Germany
       if SERVER=`fastest_cvsup -q -c ru,de`     
       then        
    		echo "Running cvsup..."        
    		cvsup -g -L 2 -h $SERVER /root/cvs-supfile     
       else        
    		echo "Oooops! There's a problem" 1>&2        
    		exit 1   
       fi
       
    #fetchindex command   
       echo "Updating ports index..."   
       cd /usr/ports   
       make fetchindex   
       portsdb -u
       
    # Also see /var/db/refuse   
       echo "Updating docs..."   
       cd /usr/doc   
       cp Makefile.orig Makefile   
       make install > /dev/null   
       echo "The following ports need upgrading: "   
       portversion -l "<"
       
       echo "DONE. Finished at `/bin/date`."
       
       echo "=========================================
       This script will NOT upgrade your ports!   
       Manually run:   
       (Do NOT forget to read /usr/ports/UPDATING before!)
                portupgrade -varR   
       Only sources download:
                portupgrade -aFrR
       Tip: To delete unused downloaded sources run:         
                portsclean -D
       ========================================="
       
       exit
    
  • За домашна работа - разучете portsnap. Как трябва да се промени скрипта?