#!/bin/sh cat >&2 << EOF Pipe the script through sh to run these commands (once you have tested that these do what you want!) For example; sh $0 | sh EOF [ -x /usr/local/sbin/portupgrade ] && PU=portupgrade || \ [ -x /usr/local/sbin/portmaster ] && PU=portmaster || \ (echo This script requires portmaster or portupgrade >&2 && exit 1) [ -z "$(make -C /usr/ports -VWITH_PKGNG)" ] && \ PKGINFO="pkg_info" || \ PKGINFO="pkg info" for port in $($PKGINFO -qox ^transmission-) do origin=$(echo $port | sed 's,transmission,&25,') pkgname=$($PKGINFO -qO $port) [ $origin != "net-p2p/transmission-remote-gui" ] && \ echo $PU -o $origin $pkgname done