[150811] contrib/mp-buildbot/mpbb-selfupdate
ryandesign at macports.org
ryandesign at macports.org
Fri Jul 29 12:39:11 PDT 2016
Revision: 150811
https://trac.macports.org/changeset/150811
Author: ryandesign at macports.org
Date: 2016-07-29 12:39:10 -0700 (Fri, 29 Jul 2016)
Log Message:
-----------
mp-buildbot: automatically install MacPorts if not present
Modified Paths:
--------------
contrib/mp-buildbot/mpbb-selfupdate
Modified: contrib/mp-buildbot/mpbb-selfupdate
===================================================================
--- contrib/mp-buildbot/mpbb-selfupdate 2016-07-29 19:37:15 UTC (rev 150810)
+++ contrib/mp-buildbot/mpbb-selfupdate 2016-07-29 19:39:10 UTC (rev 150811)
@@ -9,5 +9,23 @@
}
selfupdate() {
+ if [ ! -f "${option_port}/bin/port" ]; then
+ macports_version=2.3.4
+ macports_distname=MacPorts-${macports_version}
+ macports_distfile=${macports_distname}.tar.bz2
+ if [ ! -d ${macports_distname} ]; then
+ if [ ! -f ${macports_distfile} ]; then
+ curl -fIsLO https://distfiles.macports.org/MacPorts/${macports_distfile} || return $?
+ fi
+ tar xJf ${macports_distfile} || return $?
+ fi
+ cd ${macports_distname} || return $?
+ ./configure --prefix=${option_prefix} --enable-readline || return $?
+ make -j$(sysctl -n hw.activecpu) || return $?
+ make install || return $?
+ cd .. || return $?
+ rm -rf ${macports_distfile} ${macports_distname} || return $?
+ fi
+
"${option_prefix}/bin/port" -d selfupdate --nosync || return $?
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160729/6a70b157/attachment.html>
More information about the macports-changes
mailing list