<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[151475] contrib/mp-buildbot</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/151475">151475</a></dd>
<dt>Author</dt> <dd>cal@macports.org</dd>
<dt>Date</dt> <dd>2016-08-16 15:22:14 -0700 (Tue, 16 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>mp-buildbot: Fix SC warnings, improve err handling

Fix or disable all remaining ShellCheck warnings, add and/or improve error
handling, make sure everything is properly quoted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#contribmpbuildbotmpbbcleanup">contrib/mp-buildbot/mpbb-cleanup</a></li>
<li><a href="#contribmpbuildbotmpbbgatherarchives">contrib/mp-buildbot/mpbb-gather-archives</a></li>
<li><a href="#contribmpbuildbotmpbbinstalldependencies">contrib/mp-buildbot/mpbb-install-dependencies</a></li>
<li><a href="#contribmpbuildbotmpbbinstallport">contrib/mp-buildbot/mpbb-install-port</a></li>
<li><a href="#contribmpbuildbotmpbblistsubports">contrib/mp-buildbot/mpbb-list-subports</a></li>
<li><a href="#contribmpbuildbotmpbbselfupdate">contrib/mp-buildbot/mpbb-selfupdate</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="contribmpbuildbotmpbbcleanup"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-cleanup (151474 => 151475)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-cleanup        2016-08-16 21:50:08 UTC (rev 151474)
+++ contrib/mp-buildbot/mpbb-cleanup        2016-08-16 22:22:14 UTC (rev 151475)
</span><span class="lines">@@ -10,15 +10,15 @@
</span><span class="cx"> 
</span><span class="cx"> cleanup() {
</span><span class="cx">     echo &quot;----&gt; Deactivating ports&quot;
</span><del>-        # $option_prefix is set by mpbb
-        # shellcheck disable=SC2154
</del><ins>+    # $option_prefix is set by mpbb
+    # shellcheck disable=SC2154
</ins><span class="cx">     if [ -n &quot;$(&quot;${option_prefix}/bin/port&quot; -q installed active)&quot; ]; then
</span><span class="cx">         &quot;${option_prefix}/bin/port&quot; -fp deactivate active
</span><span class="cx">     fi
</span><span class="cx">     echo
</span><span class="cx">     echo &quot;----&gt; Uninstalling obsolete ports&quot;
</span><del>-        # $thisdir is set by mpbb and points to the directory in which this script resides
-        # shellcheck disable=SC2154
</del><ins>+    # $thisdir is set by mpbb and points to the directory in which this script resides
+    # shellcheck disable=SC2154
</ins><span class="cx">     &quot;${option_prefix}/bin/port-tclsh&quot; &quot;${thisdir}/tools/uninstall-old-ports.tcl&quot;
</span><span class="cx">     echo
</span><span class="cx">     echo &quot;----&gt; Deleting distfiles&quot;
</span></span></pre></div>
<a id="contribmpbuildbotmpbbgatherarchives"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-gather-archives (151474 => 151475)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-gather-archives        2016-08-16 21:50:08 UTC (rev 151474)
+++ contrib/mp-buildbot/mpbb-gather-archives        2016-08-16 22:22:14 UTC (rev 151475)
</span><span class="lines">@@ -11,8 +11,12 @@
</span><span class="cx"> 
</span><span class="cx"> gather-archives() {
</span><span class="cx">     curl=/usr/bin/curl
</span><ins>+    # $option_prefix is set in mpbb
+    # shellcheck disable=SC2154
</ins><span class="cx">     tclsh=${option_prefix}/bin/port-tclsh
</span><span class="cx"> 
</span><ins>+    # $option_staging_dir is set in mpbb
+    # shellcheck disable=SC2154
</ins><span class="cx">     if [ -d &quot;${option_staging_dir}&quot; ]; then
</span><span class="cx">         find &quot;${option_staging_dir}&quot; -type f -delete -print | sed -E -e &quot;s|^.*/||&quot; -e 's/^/Deleting previously staged archive: /'
</span><span class="cx">         rm -rf &quot;${option_staging_dir}&quot;
</span><span class="lines">@@ -26,7 +30,11 @@
</span><span class="cx">         archive_port=$(basename &quot;$(dirname &quot;${archive_path}&quot;)&quot;)
</span><span class="cx">         archive_basename=$(basename &quot;${archive_path}&quot;)
</span><span class="cx"> 
</span><ins>+        # $option_archive_site is set in mpbb
+        # shellcheck disable=SC2154
</ins><span class="cx">         if ! ${curl} -fIsL &quot;${option_archive_site}/${archive_port}/${archive_basename}&quot; &gt; /dev/null; then
</span><ins>+            # $option_workdir is set in mpbb
+            # shellcheck disable=SC2154
</ins><span class="cx">             if &quot;${tclsh}&quot; &quot;${option_workdir}/tools/port_binary_distributable.tcl&quot; -v &quot;${archive_port}&quot;; then
</span><span class="cx">                 echo &quot;Staging archive for upload: ${archive_basename}&quot;
</span><span class="cx">                 mkdir -p &quot;${option_staging_dir}/${archive_port}&quot; || { status=$?; break; }
</span></span></pre></div>
<a id="contribmpbuildbotmpbbinstalldependencies"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-install-dependencies (151474 => 151475)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-install-dependencies        2016-08-16 21:50:08 UTC (rev 151474)
+++ contrib/mp-buildbot/mpbb-install-dependencies        2016-08-16 22:22:14 UTC (rev 151475)
</span><span class="lines">@@ -13,10 +13,12 @@
</span><span class="cx">     local dependencies
</span><span class="cx">     local dependencies_count
</span><span class="cx">     local dependencies_counter
</span><ins>+    # $option_logdir is set in mpbb
+    # shellcheck disable=SC2154
</ins><span class="cx">     local log_status_dependencies=&quot;${option_logdir}/dependencies-progress.txt&quot;
</span><span class="cx">     local log_subports_progress=&quot;${option_logdir}/ports-progress.txt&quot;
</span><span class="cx"> 
</span><del>-    if [ -z &quot;${option_port}&quot; ]; then
</del><ins>+    if [ -z &quot;${option_port:-}&quot; ]; then
</ins><span class="cx">         errmsg &quot;--port is required&quot;
</span><span class="cx">         return 1
</span><span class="cx">     fi
</span><span class="lines">@@ -26,6 +28,8 @@
</span><span class="cx">     &gt; &quot;$log_status_dependencies&quot;
</span><span class="cx"> 
</span><span class="cx">     # calculate list of dependencies in-order
</span><ins>+    # $option_prefix and $thisdir are set in mpbb
+    # shellcheck disable=SC2154
</ins><span class="cx">     dependencies=$(&quot;${option_prefix}/bin/port-tclsh&quot; &quot;${thisdir}/tools/dependencies.tcl&quot; &quot;${option_port}&quot;)
</span><span class="cx">     if [ $? -ne 0 ]; then
</span><span class="cx">         echo &quot;Calculating dependencies for '${option_port}' failed, aborting.&quot; &gt;&amp;2
</span><span class="lines">@@ -51,7 +55,7 @@
</span><span class="cx"> 
</span><span class="cx">     echo &gt;&gt; &quot;$log_status_dependencies&quot;
</span><span class="cx"> 
</span><del>-    echo &quot;$dependencies&quot; | while read dependency; do
</del><ins>+    echo &quot;$dependencies&quot; | while read -r dependency; do
</ins><span class="cx">         # Split portname +variant1+variant2 into portname and variants, where
</span><span class="cx">         # the variants are optional.
</span><span class="cx">         depname=${dependency%% *}
</span><span class="lines">@@ -60,6 +64,8 @@
</span><span class="cx">         text=&quot;Installing dependency ($dependencies_counter of $dependencies_count) '${depname}' with variants '${depvariants}'&quot;
</span><span class="cx">         echo &quot;----&gt; ${text}&quot;
</span><span class="cx">         echo -n &quot;${text} ... &quot; &gt;&gt; &quot;$log_status_dependencies&quot;
</span><ins>+        # $depvariants isn't quoted on purpose
+        # shellcheck disable=SC2086
</ins><span class="cx">         if ! &quot;${option_prefix}/bin/port&quot; -d install --unrequested &quot;$depname&quot; $depvariants; then
</span><span class="cx">             echo &quot;Build of dependency '${depname}' failed, aborting.&quot; &gt;&amp;2
</span><span class="cx">             echo &quot;[FAIL]&quot; &gt;&gt; &quot;$log_status_dependencies&quot;
</span></span></pre></div>
<a id="contribmpbuildbotmpbbinstallport"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-install-port (151474 => 151475)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-install-port        2016-08-16 21:50:08 UTC (rev 151474)
+++ contrib/mp-buildbot/mpbb-install-port        2016-08-16 22:22:14 UTC (rev 151475)
</span><span class="lines">@@ -10,12 +10,14 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> install-port() {
</span><ins>+    # $option_logdir is set in mpbb
+    # shellcheck disable=SC2154
</ins><span class="cx">     local log_port_contents=&quot;${option_logdir}/port-contents.txt&quot;
</span><span class="cx">     local log_port_stats=&quot;${option_logdir}/port-statistics.txt&quot;
</span><span class="cx">     local log_port_main=&quot;${option_logdir}/main.log&quot;
</span><span class="cx">     local log_subports_progress=&quot;${option_logdir}/ports-progress.txt&quot;
</span><span class="cx"> 
</span><del>-    if [ -z &quot;${option_port}&quot; ]; then
</del><ins>+    if [ -z &quot;${option_port:-}&quot; ]; then
</ins><span class="cx">         errmsg &quot;--port is required&quot;
</span><span class="cx">         return 1
</span><span class="cx">     fi
</span><span class="lines">@@ -28,13 +30,17 @@
</span><span class="cx">     # log: summary for the portwatcher
</span><span class="cx">     echo -n &quot;- Installing ${option_port} ... &quot; &gt;&gt; &quot;$log_subports_progress&quot;
</span><span class="cx"> 
</span><del>-    local time_start=$(date +%s)
</del><ins>+    local time_start
+    local time_stop
+    time_start=$(date +%s)
+    # $option_prefix is set in mpbb
+    # shellcheck disable=SC2154
</ins><span class="cx">     if ! &quot;${option_prefix}/bin/port&quot; -dk install &quot;${option_port}&quot;; then
</span><span class="cx">         echo &quot;Build of '${option_port}' failed.&quot;
</span><span class="cx">         echo &quot;[FAIL]&quot; &gt;&gt; &quot;$log_subports_progress&quot;
</span><span class="cx">         return 1
</span><span class="cx">     fi
</span><del>-    local time_stop=$(date +%s)
</del><ins>+    time_stop=$(date +%s)
</ins><span class="cx"> 
</span><span class="cx">     echo &quot;[OK]&quot; &gt;&gt; &quot;$log_subports_progress&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -44,22 +50,41 @@
</span><span class="cx">     # TODO: printing statistics (and installing the port + dependencies)
</span><span class="cx">     #       only makes sense when the port hasn't been installed previously
</span><span class="cx">     # log: statistics
</span><del>-    echo &quot;time:    $(($time_stop - $time_start))s&quot; &gt;&gt; &quot;$log_port_stats&quot;
</del><ins>+    echo &quot;time:    $((time_stop - time_start))s&quot; &gt;&gt; &quot;$log_port_stats&quot;
</ins><span class="cx"> 
</span><del>-    local port_workdir=$(&quot;${option_prefix}/bin/port&quot; work &quot;${option_port}&quot;)
-    local port_workdir_size=$(du -ks &quot;$port_workdir&quot; | sed 's/^ *//' | tr '\t' '\n' | head -n 1)
-    echo &quot;workdir: ${port_workdir_size}k&quot; &gt;&gt; &quot;$log_port_stats&quot;
-    local port_destdir=&quot;$port_workdir/destroot&quot;
-    if [ -d &quot;$port_destdir&quot; ]; then 
-        local port_destdir_size=$(du -ks &quot;$port_destdir&quot; | sed 's/^ *//' | tr '\t' '\n' | head -n 1)
-        echo &quot;destdir: ${port_destdir_size}k&quot; &gt;&gt; &quot;$log_port_stats&quot;
-    else
-        echo &quot;destdir: -&quot; &gt;&gt; &quot;$log_port_stats&quot;
</del><ins>+    local port_workdir
+    local port_workdir_size=&quot;&quot;
+    local port_destdir_size=&quot;&quot;
+    local print_arg_workdir=&quot;ERROR&quot;
+    local print_arg_destdir=&quot;ERROR&quot;
+    # First, compute port_workdir_size and port_destdir_size
+    port_workdir=$(&quot;${option_prefix}/bin/port&quot; work &quot;${option_port}&quot;)
+    if [ -n &quot;$port_workdir&quot; ]; then
+        port_workdir_size=$(du -ks &quot;$port_workdir&quot; | sed 's/^ *//' | tr '\t' '\n' | head -n 1)
+        if [ $? -eq 0 ] &amp;&amp; [ -n &quot;$port_workdir_size&quot; ]; then
+            print_arg_workdir=&quot;${port_workdir_size}k&quot;
+        fi
+
+        local port_destdir=&quot;$port_workdir/destroot&quot;
+        # if we arrive here, 'port work $option_port' was successful, so we're
+        # at least going to print 'destdir: -'
+        print_arg_destdir=&quot;-&quot;
+        if [ -d &quot;$port_destdir&quot; ]; then 
+            port_destdir_size=$(du -ks &quot;$port_destdir&quot; | sed 's/^ *//' | tr '\t' '\n' | head -n 1)
+            if [ $? -eq 0 ] &amp;&amp; [ -n &quot;$port_destdir_size&quot; ]; then
+                print_arg_destdir=&quot;${port_destdir_size}k&quot;
+            fi
+        fi
</ins><span class="cx">     fi
</span><ins>+    # Then print them, or on error (or if destdir doesn't exist), print the
+    # appropriate message
+    echo &quot;workdir: $print_arg_workdir&quot; &gt;&gt; &quot;$log_port_stats&quot;
+    echo &quot;destdir: $print_arg_destdir&quot; &gt;&gt; &quot;$log_port_stats&quot;
</ins><span class="cx"> 
</span><span class="cx">     # log: main.log
</span><del>-    local port_mainlog=$(&quot;${option_prefix}/bin/port&quot; logfile &quot;${option_port}&quot;)
-    if [ -f $port_mainlog ]; then
</del><ins>+    local port_mainlog
+    port_mainlog=$(&quot;${option_prefix}/bin/port&quot; logfile &quot;${option_port}&quot;)
+    if [ $? -eq 0 ] &amp;&amp; [ -f &quot;$port_mainlog&quot; ]; then
</ins><span class="cx">         cp -f &quot;$port_mainlog&quot; &quot;$log_port_main&quot;
</span><span class="cx">     fi
</span><span class="cx"> }
</span></span></pre></div>
<a id="contribmpbuildbotmpbblistsubports"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-list-subports (151474 => 151475)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-list-subports        2016-08-16 21:50:08 UTC (rev 151474)
+++ contrib/mp-buildbot/mpbb-list-subports        2016-08-16 22:22:14 UTC (rev 151475)
</span><span class="lines">@@ -18,10 +18,14 @@
</span><span class="cx">     local exclude
</span><span class="cx">     local exclude_reasons
</span><span class="cx">     local reason
</span><ins>+    # $option_logdir is set in mpbb
+    # shellcheck disable=SC2154
</ins><span class="cx">     local log_subports_progress=&quot;${option_logdir}/ports-progress.txt&quot;
</span><span class="cx"> 
</span><span class="cx">     os_version=&quot;$(sw_vers -productVersion | cut -d . -f 1-2)&quot;
</span><span class="cx">     is_64bit_capable=&quot;$(sysctl -n hw.cpu64bit_capable)&quot;
</span><ins>+    # $optoin_prefix is set in mpbb
+    # shellcheck disable=SC2154
</ins><span class="cx">     ports=$(&quot;${option_prefix}/bin/port&quot; -q info --index --line --name &quot;${portname}&quot; &quot;subportof:${portname}&quot; 2&gt;/dev/null) || return $?
</span><span class="cx">     for port in $ports; do
</span><span class="cx">         exclude=0
</span><span class="lines">@@ -31,6 +35,8 @@
</span><span class="cx">             exclude=1
</span><span class="cx">             exclude_reasons+=(&quot;its name contains 'graveyard'&quot;)
</span><span class="cx">         else
</span><ins>+            # $thisdir is set in mpbb
+            # shellcheck disable=SC2154
</ins><span class="cx">             for portgroup in $(&quot;${option_prefix}/bin/port-tclsh&quot; &quot;${thisdir}/tools/portgroups.tcl&quot; &quot;$port&quot;); do
</span><span class="cx">                 if [ &quot;$portgroup&quot; = &quot;obsolete-1.0&quot; ]; then
</span><span class="cx">                     exclude=1
</span><span class="lines">@@ -41,7 +47,7 @@
</span><span class="cx"> 
</span><span class="cx">         if [[ $exclude -eq 0 &amp;&amp; &quot;${os_version}&quot; = &quot;10.6&quot; &amp;&amp; &quot;${is_64bit_capable}&quot; = &quot;0&quot; ]]; then
</span><span class="cx">             supported_archs=$(&quot;${option_prefix}/bin/port-tclsh&quot; &quot;${thisdir}/tools/supported-archs.tcl&quot; &quot;${port}&quot;)
</span><del>-            if [[ -n &quot;${supported_archs}&quot; &amp;&amp; !(&quot;${supported_archs}&quot; == *&quot;x86_64&quot;* &amp;&amp; &quot;${supported_archs}&quot; == *&quot;i386&quot;*) ]]; then
</del><ins>+            if [[ -n &quot;${supported_archs}&quot; &amp;&amp; ! (&quot;${supported_archs}&quot; == *&quot;x86_64&quot;* &amp;&amp; &quot;${supported_archs}&quot; == *&quot;i386&quot;*) ]]; then
</ins><span class="cx">                 exclude=1
</span><span class="cx">                 exclude_reasons+=(&quot;the ${os_version}_x86_64 builder will build it&quot;)
</span><span class="cx">             fi
</span><span class="lines">@@ -69,7 +75,7 @@
</span><span class="cx"> list-subports() {
</span><span class="cx">     local log_subports_progress=&quot;${option_logdir}/ports-progress.txt&quot;
</span><span class="cx"> 
</span><del>-    if [ $# -le 0 -a -z &quot;${option_port}&quot; ]; then
</del><ins>+    if [ $# -le 0 ] &amp;&amp; [ -z &quot;${option_port:-}&quot; ]; then
</ins><span class="cx">         errmsg &quot;Either --port or a list of positional arguments with port names is required.&quot;
</span><span class="cx">         return 1
</span><span class="cx">     fi
</span></span></pre></div>
<a id="contribmpbuildbotmpbbselfupdate"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-selfupdate (151474 => 151475)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-selfupdate        2016-08-16 21:50:08 UTC (rev 151474)
+++ contrib/mp-buildbot/mpbb-selfupdate        2016-08-16 22:22:14 UTC (rev 151475)
</span><span class="lines">@@ -9,6 +9,8 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> selfupdate() {
</span><ins>+    # $option_prefix is set in mpbb
+    # shellcheck disable=SC2154
</ins><span class="cx">     if [ ! -f &quot;${option_prefix}/bin/port&quot; ]; then
</span><span class="cx">         macports_version=2.3.4
</span><span class="cx">         macports_distname=MacPorts-${macports_version}
</span><span class="lines">@@ -20,8 +22,8 @@
</span><span class="cx">             tar -xjf ${macports_distfile} || return $?
</span><span class="cx">         fi
</span><span class="cx">         cd ${macports_distname} || return $?
</span><del>-        ./configure --prefix=${option_prefix} --enable-readline || return $?
-        make -j$(sysctl -n hw.activecpu) || return $?
</del><ins>+        ./configure --prefix=&quot;${option_prefix}&quot; --enable-readline || return $?
+        make -j&quot;$(sysctl -n hw.activecpu)&quot; || return $?
</ins><span class="cx">         make install || return $?
</span><span class="cx">         cd .. || return $?
</span><span class="cx">         rm -rf ${macports_distfile} ${macports_distname} || return $?
</span></span></pre>
</div>
</div>

</body>
</html>