[80458] contrib/mpab/deploy_archives.sh

wsiegrist at apple.com wsiegrist at apple.com
Wed Jul 13 07:21:10 PDT 2011


Revision: 80458
          http://trac.macports.org/changeset/80458
Author:   wsiegrist at apple.com
Date:     2011-07-13 07:21:10 -0700 (Wed, 13 Jul 2011)
Log Message:
-----------
Partial work to run on the master instead of the slave. Add support for non-PREFIX archive location.

Modified Paths:
--------------
    contrib/mpab/deploy_archives.sh

Modified: contrib/mpab/deploy_archives.sh
===================================================================
--- contrib/mpab/deploy_archives.sh	2011-07-13 14:18:39 UTC (rev 80457)
+++ contrib/mpab/deploy_archives.sh	2011-07-13 14:21:10 UTC (rev 80458)
@@ -3,18 +3,26 @@
 if [[ -z "$PORTLISTFILE" ]]; then
     PORTLISTFILE=portlist
 fi
+
 if [[ -z "$PREFIX" ]]; then
     PREFIX="/opt/local"
 fi
-# FIXME: configure these
+
 # download server hostname
 if [[ -z "$DLHOST" ]]; then
     DLHOST=""
 fi
+
 # path where it keeps archives
 if [[ -z "$DLPATH" ]]; then
     DLPATH="/archives"
 fi
+
+# path where archives get uploaded to master
+if [[ -z "$ULPATH" ]]; then
+    ULPATH="${PREFIX}/var/macports/software"
+fi
+
 # private key to use for signing
 if [[ -z "$PRIVKEY" ]]; then
     PRIVKEY=""
@@ -27,15 +35,18 @@
             echo $portname is distributable
             portversion=$(${PREFIX}/bin/port info --version --line ${portname})
             portrevision=$(${PREFIX}/bin/port info --revision --line ${portname})
-            for archive in ${PREFIX}/var/macports/software/${portname}/${portname}-${portversion}_${portrevision}[+.]*; do
+            for archive in ${ULPATH}/${portname}/${portname}-${portversion}_${portrevision}[+.]*; do
                 aname=$(basename $archive)
                 echo deploying archive: $aname
                 if [[ -n "$PRIVKEY" ]]; then
                     openssl dgst -ripemd160 -sign "${PRIVKEY}" -out ./${aname}.rmd160 ${archive}
                 fi
                 if [[ -n "$DLHOST" ]]; then
-                    ssh ${DLHOST} mkdir -p ${DLPATH}/${portname}
-                    rsync -av --ignore-existing ./${aname}.rmd160 ${archive} ${DLHOST}:${DLPATH}/${portname}
+                    ssh ${DLHOST} mkdir -p ${DLPATH}/${portname};
+                    rsync -av --ignore-existing ./${aname}.rmd160 ${archive} ${DLHOST}:${DLPATH}/${portname};
+		else
+                    mkdir -p ${DLPATH}/${portname};
+                    rsync -av --ignore-existing ./${aname}.rmd160 ${archive} ${DLPATH}/${portname};
                 fi
                 rm -f ./${aname}.rmd160
             done
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110713/536c8f13/attachment.html>


More information about the macports-changes mailing list