#!/bin/sh
#
# Requires sudo
#
# First argument is taken as the port dir to add, or alternatively
# the current directory is used (you many want to change /usr/ports/ to
# the location of your PortsTree).

port=${1-$(realpath $(pwd) | sed 's!/usr/ports/!!')}

buildlist="7.4-local 8.2-local 9-local 9-clang-local"

PB=/usr/local/tinderbox

cd ${PB}/scripts

for build in $buildlist
do 	echo -n "==> Adding $port to $build ... "
	sudo ./tc addBuildPortsQueueEntry -b $build -d $port
	echo [DONE]
done
