#!/bin/sh LIBCHK='libchk -x /usr/X11R6' ports=`$LIBCHK | grep ^Unresolvable | cut -d ' ' -f 5 | xargs pkg_which | sort | uniq` if [ -n "$ports" ]; then echo "Ports with broken binaries or libraries:" echo "$ports" portupgrade -f $ports else echo "No broken ports found" fi