#!/usr/local/bin/tcsh # Script to look for ports in need of updating set INDEX=/usr/ports/INDEX if (! -fr $INDEX ) then mount /usr/ports if ( ! -fr $INDEX ) then echo "Could not read $INDEX!" exit 1 endif endif echo "Ports that need updating:" foreach port (`ls /var/db/pkg`) if ( -d $port && ! { grep -q "^$port|" $INDEX } ) then echo $port endif end