#!/bin/bash
# mp-distributable

: ${MP_PREFIX:="/opt/local"}
: ${MP_SVNTRUNK:="${MP_PREFIX}/var/macports/sources/svn.macports.org/trunk"}
: ${MP_SVNBASE:="${MP_SVNTRUNK}/base"}


if [[ $# -eq 0 || $1 == "help" ]]
then
    echo "Usage example:"
    echo "mp-distributable zlib"
    exit 1
fi
PORTS=()
for PORT in "$@";do
    PORTS+=("${PORT}")
done
for ((i = 0; i < ${#PORTS[@]}; i++));do
echo ${PORTS[$i]}
    ${MP_SVNBASE}/portmgr/jobs/port_binary_distributable.tcl -v ${PORTS[$i]}
done