<!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>[152528] 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/152528">152528</a></dd>
<dt>Author</dt> <dd>larryv@macports.org</dd>
<dt>Date</dt> <dd>2016-09-11 18:59:04 -0700 (Sun, 11 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>mpbb: Implement new help system

The `--help` option has been replaced by a new `help` subcommand.
Invoking `mpbb help` displays global usage and available subcommands,
while `mpbb help &lt;subcommand&gt;` displays subcommand-specific usage.

Each subcommand script `mpbb-FOO` must now define a function `FOO-usage`
that prints its specific help to standard out.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#contribmpbuildbotmpbb">contrib/mp-buildbot/mpbb</a></li>
<li><a href="#contribmpbuildbotmpbbcheckout">contrib/mp-buildbot/mpbb-checkout</a></li>
<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>

<h3>Added Paths</h3>
<ul>
<li><a href="#contribmpbuildbotmpbbhelp">contrib/mp-buildbot/mpbb-help</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="contribmpbuildbotmpbb"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb (152527 => 152528)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb        2016-09-12 01:59:00 UTC (rev 152527)
+++ contrib/mp-buildbot/mpbb        2016-09-12 01:59:04 UTC (rev 152528)
</span><span class="lines">@@ -14,60 +14,32 @@
</span><span class="cx"> err() { msg error: &quot;$@&quot;; }
</span><span class="cx"> warn() { msg warning: &quot;$@&quot;; }
</span><span class="cx"> 
</span><del>-usage() {
-    cols=$(tput cols) || cols=80
</del><ins>+mpbb-usage() {
+    # &quot;prog&quot; is defined in mpbb-help.
+    # shellcheck disable=SC2154
+    cat &lt;&lt;EOF
+usage: $prog [&lt;global options&gt;] &lt;command&gt; [&lt;args&gt;]
</ins><span class="cx"> 
</span><del>-    fmt -w $(( cols - 8 )) &gt;&amp;2 &lt;&lt;-EOF
-Usage: $0 COMMAND [OPTION...]
</del><ins>+Build MacPorts ports in a continuous integration environment.
</ins><span class="cx"> 
</span><del>-mpbb, a script to help build MacPorts ports in a continous integration
-environment.
</del><ins>+Global options:
</ins><span class="cx"> 
</span><del>-OPTIONS
</del><ins>+  --prefix=&lt;path&gt;
+    The prefix of the MacPorts installation that will be used for
+    building ports. Defaults to \`/opt/local'.
</ins><span class="cx"> 
</span><del>- --archive-site=URL
-   Base URL of the packages archive to check whether an archive was not
-   published yet. Default is &quot;https://packages.macports.org&quot;.
</del><ins>+  --work-dir=&lt;path&gt;
+    A working directory to be used for storing temporary files,
+    accessible by the MacPorts installation specified with \`--prefix'.
+    The directory should persist between runs of \`mpbb'. Defaults to
+    the value of \$PWD or \`/tmp/mp-buildbot'.
</ins><span class="cx"> 
</span><del>- --help
-   Print this usage message.
</del><ins>+Available commands:
</ins><span class="cx"> 
</span><del>- --prefix=PREFIX
-   The prefix of the MacPorts installation that will build the ports. Defaults
-   to &quot;/opt/local&quot;.
</del><ins>+  ${cmds[0]}$(printf ', %s' &quot;${cmds[@]:1}&quot;)
</ins><span class="cx"> 
</span><del>- --svn=BINARY
-   Absolute path to the svn binary that you want to use for SVN operations. The
-   default is to find svn in your path.
-
- --svn-url=SVNURL
-   URL to a Subversion repository in a format accepted by Subversion. The
-   referenced folder must contain a dports and a base folder. The default is
-   &quot;https://svn.macports.org/repository/macports/trunk&quot;.
-
- --svn-revision=REVISION
-   Revision number in the specified Subversion repository to checkout. Defaults
-   to &quot;HEAD&quot;.
-
- --staging-dir=DIR
-   Directory where new distributable archives should be copied for deployment
-   on the archive server. Defaults to the 'archive-staging' subfolder in the
-   current directory.
-
- --work-dir=WORKDIR
-   A scratch area that mpbb will use to put temporary files, ideally kept
-   between builds. Your MacPorts installation in --prefix needs to be able to
-   access this location. Defaults to your current directory, or
-   /tmp/mp-buildbot if \$PWD isn't set.
</del><ins>+Run \`$prog help &lt;command&gt;' for per-command help.
</ins><span class="cx"> EOF
</span><del>-
-    printf &gt;&amp;2 &quot;\nCOMMANDS\n&quot;
-    for command in &quot;${commands[@]}&quot;; do
-        printf &gt;&amp;2 &quot; %s\n&quot; &quot;$command&quot;
-        printf &quot;   %s\n\n&quot; &quot;$(&quot;${command}-help&quot; | tr '\n' ' ')&quot; | fmt -w $(( cols - 8 )) &gt;&amp;2
-    done
-
-    exit 2
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> # TODO Documentation, obviously :)
</span><span class="lines">@@ -86,7 +58,7 @@
</span><span class="cx">             ;;
</span><span class="cx">         1)
</span><span class="cx">             # getopt(1) will print the bad argument to standard error.
</span><del>-            echo &gt;&amp;2 &quot;Try \`$0 --help' for more information.&quot;
</del><ins>+            echo &gt;&amp;2 &quot;Try \`$0 help' for more information.&quot;
</ins><span class="cx">             return 2
</span><span class="cx">             ;;
</span><span class="cx">         *)
</span><span class="lines">@@ -138,13 +110,12 @@
</span><span class="cx"> fi
</span><span class="cx"> 
</span><span class="cx"> # Process options.
</span><del>-parseopt help,prefix:,work-dir: &quot;$@&quot; || exit
</del><ins>+parseopt prefix:,work-dir: &quot;$@&quot; || exit
</ins><span class="cx"> 
</span><span class="cx"> # Use sensible defaults for options that weren't set on the command line.
</span><span class="cx"> : &quot;${option_port=}&quot;
</span><span class="cx"> : &quot;${option_prefix=/opt/local}&quot;
</span><span class="cx"> : &quot;${option_work_dir=${PWD:-/tmp/mp-buildbot}}&quot;
</span><del>-: &quot;${option_help=0}&quot;
</del><span class="cx"> 
</span><span class="cx"> # shellcheck disable=SC2034 disable=SC2154
</span><span class="cx"> # Not really options, but pretend they are because they're global.
</span><span class="lines">@@ -156,15 +127,18 @@
</span><span class="cx"> set -- ${args+&quot;${args[@]}&quot;}
</span><span class="cx"> 
</span><span class="cx"> # Load the subcommand implementations. Each sourced script &quot;mpbb-FOO&quot;
</span><del>-# must define functions &quot;FOO&quot; and &quot;FOO-help&quot;.
</del><ins>+# must define functions &quot;FOO&quot; and &quot;FOO-usage&quot;.
</ins><span class="cx"> cmds=()
</span><ins>+usages=(mpbb-usage)
</ins><span class="cx"> thisdir=$(cd &quot;$(dirname &quot;$0&quot;)&quot; &amp;&amp; pwd)
</span><span class="cx"> for cmdfile in &quot;$thisdir/mpbb-&quot;*; do
</span><span class="cx">     # Unfortunately ShellCheck does not currently support following multiple
</span><span class="cx">     # files, so we'll just disable the warning.
</span><span class="cx">     # shellcheck disable=SC1090
</span><span class="cx">     if . &quot;$cmdfile&quot;; then
</span><del>-        cmds+=(&quot;${cmdfile##*/mpbb-}&quot;)
</del><ins>+        cmd=${cmdfile##*/mpbb-}
+        cmds+=(&quot;$cmd&quot;)
+        usages+=(&quot;${cmd}-usage&quot;)
</ins><span class="cx">     else
</span><span class="cx">         err &quot;failed to load subcommand script \`$cmdfile'&quot;
</span><span class="cx">         exit 3
</span><span class="lines">@@ -173,7 +147,8 @@
</span><span class="cx"> 
</span><span class="cx"> if (( $# &lt; 1 )); then
</span><span class="cx">     err &quot;No command specified&quot;
</span><del>-    usage
</del><ins>+    echo &gt;&amp;2 &quot;Try \`$0 help' for more information.&quot;
+    exit 2
</ins><span class="cx"> fi
</span><span class="cx"> 
</span><span class="cx"> subcmd=$1
</span><span class="lines">@@ -185,14 +160,10 @@
</span><span class="cx"> done
</span><span class="cx"> if (( $? != 0 || ${#cmds[@]} == 0 )); then
</span><span class="cx">     err &quot;Unknown command \`$command'&quot;
</span><del>-    usage
</del><ins>+    echo &gt;&amp;2 &quot;Try \`$0 help' for more information.&quot;
+    exit 2
</ins><span class="cx"> fi
</span><span class="cx"> 
</span><del>-## If subcommand help is requested, print that
-if [[ $option_help -eq 1 ]]; then
-    usage
-fi
-
</del><span class="cx"> ## Otherwise, run the command and deal with errors
</span><span class="cx"> PORTSRC=${option_work_dir}/macports.conf &quot;$subcmd&quot; &quot;$@&quot;
</span><span class="cx"> readonly rc=$?
</span></span></pre></div>
<a id="contribmpbuildbotmpbbcheckout"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-checkout (152527 => 152528)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-checkout        2016-09-12 01:59:00 UTC (rev 152527)
+++ contrib/mp-buildbot/mpbb-checkout        2016-09-12 01:59:04 UTC (rev 152528)
</span><span class="lines">@@ -5,12 +5,32 @@
</span><span class="cx"> # This script is sourced by the mpbb wrapper script.
</span><span class="cx"> # Do not execute this directly!
</span><span class="cx"> 
</span><ins>+checkout-usage() {
+    # &quot;prog&quot; is defined in mpbb-help.
+    # shellcheck disable=SC2154
+    cat &lt;&lt;EOF
+usage: $prog [&lt;global opts&gt;] checkout [&lt;opts&gt;]
</ins><span class="cx"> 
</span><del>-checkout-help() {
-    cat &lt;&lt;EOF
-Update or checkout a working copy of the ports tree from --svn-url to specific
-SVN revision (--svn-revision), update or create the PortIndex and configure
-the MacPorts installation to use this ports tree.
</del><ins>+Obtain a working copy of the jobs tools and ports tree and configure
+MacPorts to use the latter as a port source.
+
+Options:
+
+  --svn=&lt;path&gt;
+    A command-line Subversion client. Defaults to the first \`svn'
+    executable found in \$PATH.
+
+  --svn-url=&lt;URL&gt;
+    URL to a Subversion repository that contains \`dports' and
+    \`base/portmgr/jobs' subdirectories. Only used when checking out
+    a new working copy. Defaults to
+    \`https://svn.macports.org/repository/macports/trunk'.
+
+  --svn-revision=&lt;rev&gt;
+    Revision number at which the ports tree will be checked out.
+    Defaults to \`HEAD'.
+
+Run \`$prog help' for global options and a list of other subcommands.
</ins><span class="cx"> EOF
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="contribmpbuildbotmpbbcleanup"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-cleanup (152527 => 152528)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-cleanup        2016-09-12 01:59:00 UTC (rev 152527)
+++ contrib/mp-buildbot/mpbb-cleanup        2016-09-12 01:59:04 UTC (rev 152528)
</span><span class="lines">@@ -5,8 +5,16 @@
</span><span class="cx"> # This script is sourced by the mpbb wrapper script.
</span><span class="cx"> # Do not execute this directly!
</span><span class="cx"> 
</span><del>-cleanup-help() {
-    echo &quot;Clean up remnants from previous builds.&quot;
</del><ins>+cleanup-usage() {
+    # &quot;prog&quot; is defined in mpbb-help.
+    # shellcheck disable=SC2154
+    cat &lt;&lt;EOF
+usage: $prog [&lt;global opts&gt;] cleanup
+
+Clean up after a build.
+
+Run \`$prog help' for global options and a list of other subcommands.
+EOF
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> cleanup() {
</span></span></pre></div>
<a id="contribmpbuildbotmpbbgatherarchives"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-gather-archives (152527 => 152528)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-gather-archives        2016-09-12 01:59:00 UTC (rev 152527)
+++ contrib/mp-buildbot/mpbb-gather-archives        2016-09-12 01:59:04 UTC (rev 152528)
</span><span class="lines">@@ -5,9 +5,28 @@
</span><span class="cx"> # This script is sourced by the mpbb wrapper script.
</span><span class="cx"> # Do not execute this directly!
</span><span class="cx"> 
</span><ins>+gather-archives-usage() {
+    # &quot;prog&quot; is defined in mpbb-help.
+    # shellcheck disable=SC2154
+    cat &lt;&lt;EOF
+usage: $prog [&lt;global opts&gt;] gather-archives [&lt;opts&gt;]
</ins><span class="cx"> 
</span><del>-gather-archives-help() {
-    echo &quot;Gather unpublished distributable archives of the built port and its dependencies.&quot;
</del><ins>+Copy unpublished, distributable archives of active ports into a staging
+directory for uploading.
+
+Options:
+
+  --archive-site=&lt;URL&gt;
+    URL of a mirror to check for preexisting archives. Defaults to
+    \`https://packages.macports.org'.
+
+  --staging-dir=&lt;path&gt;
+    A directory for storing distributable archives before deployment.
+    Defaults to the \`archive-staging' subdirectory of the \`--work-dir'
+    working directory.
+
+Run \`$prog help' for global options and a list of other subcommands.
+EOF
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> gather-archives() {
</span></span></pre></div>
<a id="contribmpbuildbotmpbbhelp"></a>
<div class="addfile"><h4>Added: contrib/mp-buildbot/mpbb-help (0 => 152528)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-help                                (rev 0)
+++ contrib/mp-buildbot/mpbb-help        2016-09-12 01:59:04 UTC (rev 152528)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+#!/bin/bash
+# -*- coding: utf-8; mode: sh; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=sh:et:sw=4:ts=4:sts=4
+
+# Note:
+# This script is sourced by the mpbb wrapper script.
+# Do not execute this directly!
+
+help-usage() {
+    cat &lt;&lt;EOF
+usage: $prog help [&lt;command&gt;]
+
+Show usage information for \`$prog' or a specific \`$prog' subcommand.
+
+Run \`$prog help' for global options and a list of other subcommands.
+EOF
+}
+
+help() {
+    local cols helpfunc prog
+    cols=$(tput cols) || cols=80
+    # The main program should define &quot;mpbb-usage&quot;, which is called if
+    # &quot;mpbb help&quot; is invoked without any arguments.
+    helpfunc=${1-mpbb}-usage
+    prog=$(basename &quot;$0&quot;)
+    readonly cols helpfunc prog
+
+    # This loop exits with 0 if usages contains helpfunc or is empty.
+    for usage in &quot;${usages[@]}&quot;; do
+        [[ $usage == &quot;$helpfunc&quot; ]] &amp;&amp; break
+    done
+    if (( $? != 0 || ${#usages[@]} == 0 )); then
+        err &quot;No help available for subcommand \`${helpfunc%-usage}'&quot;
+        return 2
+    fi
+
+    &quot;$helpfunc&quot; | fmt -w $((cols - 8)) &gt;&amp;2
+}
</ins></span></pre></div>
<a id="contribmpbuildbotmpbbinstalldependencies"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-install-dependencies (152527 => 152528)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-install-dependencies        2016-09-12 01:59:00 UTC (rev 152527)
+++ contrib/mp-buildbot/mpbb-install-dependencies        2016-09-12 01:59:04 UTC (rev 152528)
</span><span class="lines">@@ -5,9 +5,16 @@
</span><span class="cx"> # This script is sourced by the mpbb wrapper script.
</span><span class="cx"> # Do not execute this directly!
</span><span class="cx"> 
</span><ins>+install-dependencies-usage() {
+    # &quot;prog&quot; is defined in mpbb-help.
+    # shellcheck disable=SC2154
+    cat &lt;&lt;EOF
+usage: $prog [&lt;global opts&gt;] install-dependencies &lt;port&gt;
</ins><span class="cx"> 
</span><del>-install-dependencies-help() {
-    echo &quot;Build and install all dependencies of port --port.&quot;
</del><ins>+Build and install the dependencies of the given port.
+
+Run \`$prog help' for global options and a list of other subcommands.
+EOF
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> get-maintainers() {
</span></span></pre></div>
<a id="contribmpbuildbotmpbbinstallport"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-install-port (152527 => 152528)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-install-port        2016-09-12 01:59:00 UTC (rev 152527)
+++ contrib/mp-buildbot/mpbb-install-port        2016-09-12 01:59:04 UTC (rev 152528)
</span><span class="lines">@@ -5,9 +5,16 @@
</span><span class="cx"> # This script is sourced by the mpbb wrapper script.
</span><span class="cx"> # Do not execute this directly!
</span><span class="cx"> 
</span><ins>+install-port-usage() {
+    # &quot;prog&quot; is defined in mpbb-help.
+    # shellcheck disable=SC2154
+    cat &lt;&lt;EOF
+usage: $prog [&lt;global opts&gt;] install-port [&lt;opts&gt;] &lt;port&gt;
</ins><span class="cx"> 
</span><del>-install-port-help() {
-    echo &quot;Build and install the port --port itself.&quot;
</del><ins>+Build and install the given port.
+
+Run \`$prog help' for global options and a list of other subcommands.
+EOF
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> get-maintainers() {
</span></span></pre></div>
<a id="contribmpbuildbotmpbblistsubports"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-list-subports (152527 => 152528)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-list-subports        2016-09-12 01:59:00 UTC (rev 152527)
+++ contrib/mp-buildbot/mpbb-list-subports        2016-09-12 01:59:04 UTC (rev 152528)
</span><span class="lines">@@ -5,10 +5,16 @@
</span><span class="cx"> # This script is sourced by the mpbb wrapper script.
</span><span class="cx"> # Do not execute this directly!
</span><span class="cx"> 
</span><ins>+list-subports-usage() {
+    # &quot;prog&quot; is defined in mpbb-help.
+    # shellcheck disable=SC2154
+    cat &lt;&lt;EOF
+usage: $prog [&lt;global opts&gt;] list-subports &lt;port&gt; [&lt;port2&gt; [...]]
</ins><span class="cx"> 
</span><del>-list-subports-help() {
-    echo &quot;Print the name of port --port and its subports.&quot;
-    echo &quot;Alternatively, print the name and subports of multiple ports given as positional arguments.&quot;
</del><ins>+Print the name and subports of each given port to standard output.
+
+Run \`$prog help' for global options and a list of other subcommands.
+EOF
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> print-subports() {
</span></span></pre></div>
<a id="contribmpbuildbotmpbbselfupdate"></a>
<div class="modfile"><h4>Modified: contrib/mp-buildbot/mpbb-selfupdate (152527 => 152528)</h4>
<pre class="diff"><span>
<span class="info">--- contrib/mp-buildbot/mpbb-selfupdate        2016-09-12 01:59:00 UTC (rev 152527)
+++ contrib/mp-buildbot/mpbb-selfupdate        2016-09-12 01:59:04 UTC (rev 152528)
</span><span class="lines">@@ -5,8 +5,17 @@
</span><span class="cx"> # This script is sourced by the mpbb wrapper script.
</span><span class="cx"> # Do not execute this directly!
</span><span class="cx"> 
</span><del>-selfupdate-help() {
-    echo &quot;Run selfupdate --nosync in the MacPorts installation specified by the --prefix flag&quot;
</del><ins>+selfupdate-usage() {
+    # &quot;prog&quot; is defined in mpbb-help.
+    # shellcheck disable=SC2154
+    cat &lt;&lt;EOF
+usage: $prog [&lt;global options&gt;] selfupdate
+
+Install or update the auxiliary MacPorts base installation. (To reindex
+port sources, use \`$prog checkout'.)
+
+Run \`$prog help' for global options and a list of other subcommands.
+EOF
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> selfupdate() {
</span></span></pre>
</div>
</div>

</body>
</html>