[120362] contrib/mpab/chroot-scripts/buildports

jmr at macports.org jmr at macports.org
Sat May 24 02:50:09 PDT 2014


Revision: 120362
          https://trac.macports.org/changeset/120362
Author:   jmr at macports.org
Date:     2014-05-24 02:50:08 -0700 (Sat, 24 May 2014)
Log Message:
-----------
mpab: use port-tclsh instead of /usr/bin/tclsh if available

Modified Paths:
--------------
    contrib/mpab/chroot-scripts/buildports

Modified: contrib/mpab/chroot-scripts/buildports
===================================================================
--- contrib/mpab/chroot-scripts/buildports	2014-05-24 09:35:15 UTC (rev 120361)
+++ contrib/mpab/chroot-scripts/buildports	2014-05-24 09:50:08 UTC (rev 120362)
@@ -33,6 +33,10 @@
 if [[ -z "$PREFIX" ]]; then
     PREFIX=/opt/local
 fi
+TCLSH=${PREFIX}/bin/port-tclsh
+if [[ ! -x ${PREFIX}/bin/port-tclsh ]]; then
+    TCLSH=/usr/bin/tclsh
+fi
 
 function uninstallPorts()
 {
@@ -70,7 +74,7 @@
 if [[ -f /var/tmp/portlist && `head -n1 /var/tmp/portlist` != "all" ]]; then
    portList=`/bin/cat /var/tmp/portlist`
 else
-   portList=`/usr/bin/tclsh /var/tmp/genportlist.tcl`
+   portList=`$TCLSH /var/tmp/genportlist.tcl`
    useFailCache=1
 fi
 /bin/rm -f /var/tmp/portlist
@@ -86,7 +90,7 @@
 
    echo "Building ${portName} (${currentCount} of ${portCount})...\c" | tee -a ${PROGRESSLOG}
    # If there's a package, don't build again
-   if [[ -f `/usr/bin/tclsh /var/tmp/archivepath.tcl $portName` ]]; then
+   if [[ -f `$TCLSH /var/tmp/archivepath.tcl $portName` ]]; then
       echo "package found, not building again" | tee -a ${PROGRESSLOG} | tee ${PORTRESULTSDIR}/success/${portName}.log
    else
       skipPort=""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140524/63cb567b/attachment.html>


More information about the macports-changes mailing list