Index: /users/pixilla/scripts/mp-distributable
===================================================================
--- /users/pixilla/scripts/mp-distributable	(revision 98238)
+++ /users/pixilla/scripts/mp-distributable	(revision 98238)
@@ -0,0 +1,9 @@
+#!/bin/bash
+# mp-distributable
+if [[ $# -eq 0 || $1 == "help" ]]
+then
+    echo "Usage example:"
+    echo "mp-distributable libz"
+    exit 1
+fi
+/opt/local/var/macports/sources/svn.macports.org/trunk/base/portmgr/jobs/port_binary_distributable.tcl -v "$@"
Index: /users/pixilla/scripts/mp-grid-port-rdeps
===================================================================
--- /users/pixilla/scripts/mp-grid-port-rdeps	(revision 98238)
+++ /users/pixilla/scripts/mp-grid-port-rdeps	(revision 98238)
@@ -0,0 +1,13 @@
+#!/bin/bash
+# mp-grid-port-rdeps
+if [[ $# -eq 0 || $1 == "help" ]]
+then
+    echo "mp-grid-port-rdeps <stdin> # port -q rdeps $@"
+    echo "Usage example:"
+    echo "mp-grid-port-rdeps zlib"
+    echo "mp-grid-port-rdeps dependentof:zlib"
+    exit 1
+fi
+
+port -q rdeps $@ | sed -e '/^-/d' -e 's/  /\|\|/g' -e 's/^\|\|/  /g' -e 's/\|\|/\| /g' &&
+exit 0
Index: /users/pixilla/scripts/mp-make-patches
===================================================================
--- /users/pixilla/scripts/mp-make-patches	(revision 98238)
+++ /users/pixilla/scripts/mp-make-patches	(revision 98238)
@@ -0,0 +1,46 @@
+#!/bin/sh
+# mp-make-patches
+if [[ $# -eq 0 || $1 == "help" ]]
+then
+    echo "Usage example:"
+    echo "cd $(port dir bash-completion)"
+    echo "sudo port extract"
+    echo "sudo cp -R ./work/$(port info --version bash-completion | sed -e 's,version: ,bash-completion-,') ./a"
+    echo "sudo cp -R ./a ./b"
+    echo "# Edit files in b"
+    echo "sudo bash -c 'echo 1234 > b/newfile'"
+    echo "mkdir ./files"
+    echo "mp-make-patches a b"
+    echo "# Example mp-make-patches stdout:"
+    echo "patch.pre_args      -p1"
+    echo "patchfiles          patch-newfile.diff"
+    echo "# Copy mp-make-patches stdout and paste into Portfile"
+    exit 1
+fi
+PROCESSED_FILES=0
+CHANGED_FILES=$(diff -Nqur -x "\.*" $1 $2 | awk '{print $2}' | sed "s;$1/;;" | sed 's/\([^ ]+\)/\1 /g')
+CHANGED_FILES=($CHANGED_FILES)
+COUNTER=0
+if [ ${#CHANGED_FILES[@]} -gt 0 ]
+then
+    echo "patch.pre_args      -p1"
+    while [  $COUNTER -lt ${#CHANGED_FILES[@]} ]
+    do
+        DIFF_NAME=$(echo ${CHANGED_FILES[$COUNTER]} | sed 's;/;-;g')
+        diff -Nu {$1,$2}/${CHANGED_FILES[$COUNTER]} > files/patch-$DIFF_NAME.diff
+        let COUNTER=COUNTER+1
+        if [ $COUNTER -eq ${#CHANGED_FILES[@]} ]
+        then
+            EOL=""
+        else
+            EOL=" \\"
+        fi
+        if [ $COUNTER -eq 1 ]
+        then
+            echo "patchfiles          patch-${DIFF_NAME}.diff${EOL}"
+        else
+            echo "                    patch-${DIFF_NAME}.diff${EOL}"
+        fi
+    done
+fi
+exit 0
Index: /users/pixilla/scripts/mp-shared-objects
===================================================================
--- /users/pixilla/scripts/mp-shared-objects	(revision 98237)
+++ /users/pixilla/scripts/mp-shared-objects	(revision 98238)
@@ -1,3 +1,6 @@
 #!/bin/bash
+# mp-shared-objects
+# Print path of linked objects and optionally test for their existence on disk.
+
 # Argument = [-q] <path name>
 
Index: /users/pixilla/scripts/mp-sqlite-registry
===================================================================
--- /users/pixilla/scripts/mp-sqlite-registry	(revision 98238)
+++ /users/pixilla/scripts/mp-sqlite-registry	(revision 98238)
@@ -0,0 +1,4 @@
+#!/bin/sh
+# mp-sqlite-registry
+EXECPATH=$(dirname $0)
+sqlite3 --init ${EXECPATH}/mp-sqlite-registry.init /opt/local/var/macports/registry/registry.db "$@" 2>&1 | tail +3
Index: /users/pixilla/scripts/mp-sqlite-registry.init
===================================================================
--- /users/pixilla/scripts/mp-sqlite-registry.init	(revision 98238)
+++ /users/pixilla/scripts/mp-sqlite-registry.init	(revision 98238)
@@ -0,0 +1,1 @@
+.load /opt/local/share/macports/sqlite/macports.sqlext
Index: /users/pixilla/scripts/mp-svn-propedit
===================================================================
--- /users/pixilla/scripts/mp-svn-propedit	(revision 98237)
+++ /users/pixilla/scripts/mp-svn-propedit	(revision 98238)
@@ -1,3 +1,6 @@
 #!/bin/bash
+# mp-svn-propedit
+# Edit svn commit messages.
+
 # Argument = [-q] <path name>
 
Index: /users/pixilla/scripts/mp-svn-st-port
===================================================================
--- /users/pixilla/scripts/mp-svn-st-port	(revision 98238)
+++ /users/pixilla/scripts/mp-svn-st-port	(revision 98238)
@@ -0,0 +1,11 @@
+#!/bin/sh
+# mp-svn-st-port
+# Get svn st for "port dir <stdin>"
+CMD="port dir $@"
+#echo $CMD
+#exit
+#$CMD
+#exit
+for dir in $($CMD); do \
+    svn st ${dir}
+done
Index: /users/pixilla/scripts/mp-svn-tree-setup
===================================================================
--- /users/pixilla/scripts/mp-svn-tree-setup	(revision 98238)
+++ /users/pixilla/scripts/mp-svn-tree-setup	(revision 98238)
@@ -0,0 +1,82 @@
+#!/bin/bash
+# mp-svn-tree-setup
+
+# set date for file names
+DATE=$(date +%Y%m%d%H%M$S)
+
+# set MacPorts prefix if not in env
+[[ -z $MP_PREFIX ]] && MP_PREFIX=/opt/local
+
+# set local svn directory if not in env
+[[ -z $MP_SVNDIR ]] && MP_SVNDIR=$MP_PREFIX/var/macports/sources/svn.macports.org
+
+# set svn repo to get if not in env
+# If you want to build base set MP_SVNREPO to trunk (base, doc, doc-new, dports and www).
+[[ -z $MP_SVNREPO ]] && MP_SVNREPO=trunk/dports
+
+# temp sources.conf file if not in env
+[[ -z $MP_SRCCONFTEMP ]] && MP_SRCCONFTEMP=/tmp/sources.conf.$DATE
+
+if [ "x$1" = "xgo" ]; then
+
+    # create and cd to repository directory
+    sudo mkdir -p $MP_SVNDIR
+    sudo chown -R $(whoami) $MP_SVNDIR
+    cd $MP_SVNDIR
+    # checkout macports trunk
+    svn co https://svn.macports.org/repository/macports/$MP_SVNREPO $MP_SVNREPO
+    # create port index files
+    cd trunk/dports
+    portindex
+    # sources.conf: comment out rsync directories and save to $MP_SRCCONFTEMP
+    sudo sed 's;^rsync://rsync.macports.org;#rsync://rsync.macports.org;g' $MP_PREFIX/etc/macports/sources.conf > $MP_SRCCONFTEMP
+    # sources.conf: add svn dports to end of $MP_SRCCONFTEMP
+    echo "file://$MP_SVNDIR/trunk/dports [default]" >> $MP_SRCCONFTEMP
+    # sources.conf: move current sources.conf out of the way and move $MP_SRCCONFTEMP in place
+    sudo mv $MP_PREFIX/etc/macports/{sources.conf,sources.conf.$DATE}
+    sudo mv $MP_SRCCONFTEMP $MP_PREFIX/etc/macports/sources.conf
+elif [ "x$1" = "xshow" ]; then
+
+    cat <<EOF
+
+# create and cd to repository directory
+sudo mkdir -p $MP_SVNDIR
+sudo chown -R $(whoami) $MP_SVNDIR
+cd $MP_SVNDIR
+# checkout macports trunk
+svn co https://svn.macports.org/repository/macports/$MP_SVNREPO $MP_SVNREPO
+# create port index files
+cd trunk/dports
+portindex
+# sources.conf: comment out rsync directories and save to $MP_SRCCONFTEMP
+sudo sed 's;^rsync://rsync.macports.org;#rsync://rsync.macports.org;g' $MP_PREFIX/etc/macports/sources.conf > $MP_SRCCONFTEMP
+# sources.conf: add svn dports to end of $MP_SRCCONFTEMP
+echo "file://$MP_SVNDIR/trunk/dports [default]" >> $MP_SRCCONFTEMP
+# sources.conf: move current sources.conf out of the way and move $MP_SRCCONFTEMP in place
+sudo mv $MP_PREFIX/etc/macports/{sources.conf,sources.conf.$DATE}
+sudo mv $MP_SRCCONFTEMP $MP_PREFIX/etc/macports/sources.conf
+
+EOF
+
+else
+
+    echo ""
+    echo "# You can set these env vars to control this script"
+    echo "MP_PREFIX=$MP_PREFIX"
+    echo "MP_SVNDIR=$MP_SVNDIR"
+    echo "MP_SVNREPO=$MP_SVNREPO"
+    echo "MP_SRCCONFTEMP=$MP_SRCCONFTEMP"
+    echo ""
+    echo "# You can change these vars like so:"
+    echo "MP_PREFIX=/opt/macports-test $(basename ${0}) go"
+    echo ""
+    echo "# MP_PREFIX must be an existing MacPorts prefix. NO CHECKS ARE MADE!"
+    echo ""
+    echo "# To print the generated commands to stdout add 'show' as the first arg:"
+    echo "$(basename ${0}) show"
+    echo ""
+    echo "# To execute the generated commands add 'go' as the first arg:"
+    echo "$(basename ${0}) go"
+    echo ""
+    echo ""
+fi
Index: /users/pixilla/scripts/mp-svn-up-dports
===================================================================
--- /users/pixilla/scripts/mp-svn-up-dports	(revision 98238)
+++ /users/pixilla/scripts/mp-svn-up-dports	(revision 98238)
@@ -0,0 +1,11 @@
+#!/bin/bash
+# mp-svn-up-dports
+# Set vars if not set.
+: ${MP_PREFIX:="/opt/local"}
+: ${MP_SVNCMD:="/opt/local/bin/svn"}
+: ${MP_SVNTRUNK:="${MP_PREFIX}/var/macports/sources/svn.macports.org/trunk"}
+: ${MP_SVNDPORTS:="${MP_SVNTRUNK}/dports"}
+echo "MP_SVNDPORTS=${MP_SVNDPORTS}"
+cd "${MP_SVNDPORTS}"
+${MP_SVNCMD} up
+portindex
Index: /users/pixilla/scripts/mp-svn-up-trunk
===================================================================
--- /users/pixilla/scripts/mp-svn-up-trunk	(revision 98238)
+++ /users/pixilla/scripts/mp-svn-up-trunk	(revision 98238)
@@ -0,0 +1,12 @@
+#!/bin/bash
+# mp-svn-up-trunk
+# Set vars if not set.
+: ${MP_PREFIX:="/opt/local"}
+: ${MP_SVNCMD:="/opt/local/bin/svn"}
+: ${MP_SVNTRUNK:="${MP_PREFIX}/var/macports/sources/svn.macports.org/trunk"}
+echo "MP_PREFIX=${MP_PREFIX}"
+echo "MP_SVNTRUNK=${MP_SVNTRUNK}"
+
+# svn update trunk
+cd "${MP_SVNTRUNK}"
+${MP_SVNCMD} up
Index: /users/pixilla/scripts/mp-trac-table-port
===================================================================
--- /users/pixilla/scripts/mp-trac-table-port	(revision 98238)
+++ /users/pixilla/scripts/mp-trac-table-port	(revision 98238)
@@ -0,0 +1,33 @@
+#!/bin/sh
+# mp-trac-table-port
+# Make trac wiki formatted table of MacPorts ports matching "port echo <stdin>"
+CMD="port echo $@"
+#echo $CMD
+#exit
+echo "||'''Port'''||'''Category'''||'''Repository'''||'''Tickets'''||"; \
+for name in $($CMD); do \
+    svn info $(port file $name) 2>&1 \
+    | grep -B 20 -E "^Revision" \
+    | grep -E '^URL: https?://svn.macports.org/repository/macports/' \
+    | sed -E \
+        -e 's|^URL: https?://svn.macports.org/repository/macports/||' \
+        -e 's|/Portfile$||' \
+    | awk -v NAME=$name 'BEGIN \
+        { FS = "/" } ; \
+        { printf "||[source:"$0" "NAME"]||[source:" } ; \
+        { \
+            for (x=1; x<NF; x++) { \
+                printf "%s", $x ; \
+                if (x != NF-1) printf "/" \
+            } \
+        } ; \
+        { printf " "$(NF-1)"]||[source:" } ; \
+        { \
+            for (x=1; x<NF-1; x++) { \
+                printf "%s", $x ; \
+                if (x != NF-2) printf "/" \
+            } \
+        } ; \
+        { printf " "$(NF-3)"]||[[TicketQuery(port="NAME"&status=new|assigned|reopened)]]||\n" } ; \
+        ' ;
+done
Index: ers/pixilla/scripts/mp-trac-user-ports
===================================================================
--- /users/pixilla/scripts/mp-trac-user-ports	(revision 98237)
+++ 	(revision )
@@ -1,28 +1,0 @@
-#!/bin/sh
-echo "||'''Port'''||'''Category'''||'''Repository'''||'''Tickets'''||"; \
-for name in $(port echo "maintainer:(\W|^)$1(\W|$)"); do \
-    svn info $(port file $name) 2>&1 \
-    | grep -B 20 -E "^Revision" \
-    | grep -E '^URL: https?://svn.macports.org/repository/macports/' \
-    | sed -E \
-        -e 's|^URL: https?://svn.macports.org/repository/macports/||' \
-        -e 's|/Portfile$||' \
-    | awk -v NAME=$name 'BEGIN \
-        { FS = "/" } ; \
-        { printf "||[source:"$0" "NAME"]||[source:" } ; \
-        { \
-            for (x=1; x<NF; x++) { \
-                printf "%s", $x ; \
-                if (x != NF-1) printf "/" \
-            } \
-        } ; \
-        { printf " "$(NF-1)"]||[source:" } ; \
-        { \
-            for (x=1; x<NF-1; x++) { \
-                printf "%s", $x ; \
-                if (x != NF-2) printf "/" \
-            } \
-        } ; \
-        { printf " "$(NF-3)"]||[[TicketQuery(port="NAME"&status=new|assigned|reopened)]]||\n" } ; \
-        ' ;
-done
Index: /users/pixilla/scripts/mp-upgrade-base
===================================================================
--- /users/pixilla/scripts/mp-upgrade-base	(revision 98238)
+++ /users/pixilla/scripts/mp-upgrade-base	(revision 98238)
@@ -0,0 +1,22 @@
+#!/bin/bash
+# mp-upgrade-base
+: ${MP_PREFIX:="/opt/local"}
+: ${MP_SVNCMD:="/opt/local/bin/svn"}
+: ${MP_SVNTRUNK:="${MP_PREFIX}/var/macports/sources/svn.macports.org/trunk"}
+: ${MP_SVNBASE:="${MP_SVNTRUNK}/base"}
+echo "MP_SVNBASE=${MP_SVNBASE}"
+if [ "${MP_PREFIX}" = "/opt/local" ];then
+  CONFIGURE_ARGS="--prefix=${MP_PREFIX} --enable-readline"
+else
+  CONFIGURE_ARGS="--prefix=${MP_PREFIX} --enable-readline --with-tclpackage=${MP_PREFIX}/Library/Tcl --with-applications-dir=${MP_PREFIX}/Applications"
+fi
+echo "CONFIGURE_ARGS=${CONFIGURE_ARGS}"
+cd "${MP_SVNBASE}"
+${MP_SVNCMD} upgrade
+${MP_SVNCMD} up
+make distclean
+./configure ${CONFIGURE_ARGS}
+make
+sudo make install
+make distclean
+port version
Index: /users/pixilla/scripts/mp-upgrade-trunk
===================================================================
--- /users/pixilla/scripts/mp-upgrade-trunk	(revision 98238)
+++ /users/pixilla/scripts/mp-upgrade-trunk	(revision 98238)
@@ -0,0 +1,37 @@
+#!/bin/bash
+# mp-upgrade-trunk
+# Set vars if not set.
+: ${MP_PREFIX:="/opt/local"}
+: ${MP_SVNCMD:="/opt/local/bin/svn"}
+: ${MP_SVNTRUNK:="${MP_PREFIX}/var/macports/sources/svn.macports.org/trunk"}
+: ${MP_SVNDPORTS:="${MP_SVNTRUNK}/dports"}
+: ${MP_SVNBASE:="${MP_SVNTRUNK}/base"}
+echo "MP_PREFIX=${MP_PREFIX}"
+echo "MP_SVNCMD=${MP_SVNCMD}"
+echo "MP_SVNTRUNK=${MP_SVNTRUNK}"
+echo "MP_SVNDPORTS=${MP_SVNDPORTS}"
+echo "MP_SVNBASE=${MP_SVNBASE}"
+
+# svn upgrade and update trunk
+cd "${MP_SVNTRUNK}"
+${MP_SVNCMD} upgrade
+${MP_SVNCMD} up
+
+# build base
+cd "${MP_SVNBASE}"
+if [ "${MP_PREFIX}" = "/opt/local" ];then
+  CONFIGURE_ARGS="--prefix=${MP_PREFIX} --enable-readline"
+else
+  CONFIGURE_ARGS="--prefix=${MP_PREFIX} --enable-readline --with-tclpackage=${MP_PREFIX}/Library/Tcl --with-applications-dir=${MP_PREFIX}/Applications"
+fi
+echo "CONFIGURE_ARGS=${CONFIGURE_ARGS}"
+make distclean
+./configure ${CONFIGURE_ARGS}
+make
+sudo make install
+make distclean
+port version
+
+# update portindex
+cd "${MP_SVNDPORTS}"
+portindex
Index: /users/pixilla/scripts/mp-upgrade-trunk-all
===================================================================
--- /users/pixilla/scripts/mp-upgrade-trunk-all	(revision 98238)
+++ /users/pixilla/scripts/mp-upgrade-trunk-all	(revision 98238)
@@ -0,0 +1,13 @@
+#!/bin/bash
+# mp-upgrade-trunk-all
+. ~/.bash_profile
+# Store our active MP* function name.
+MP_PREOLD=$(MP-GET)
+echo $MP_PREOLD
+# Call each MP* function followed by pm-upgrad-trunk
+for MPPRE in $(MP-LIST);do
+  $MPPRE
+  mp-upgrade-trunk
+done
+# Call our original MP* function to end up where we started
+$MP_PREOLD
