[152573] contrib/mp-buildbot/mpbb

larryv at macports.org larryv at macports.org
Mon Sep 12 11:43:40 PDT 2016


Revision: 152573
          https://trac.macports.org/changeset/152573
Author:   larryv at macports.org
Date:     2016-09-12 11:43:40 -0700 (Mon, 12 Sep 2016)
Log Message:
-----------
mpbb: Revise shellcheck directives

Modified Paths:
--------------
    contrib/mp-buildbot/mpbb

Modified: contrib/mp-buildbot/mpbb
===================================================================
--- contrib/mp-buildbot/mpbb	2016-09-12 18:43:38 UTC (rev 152572)
+++ contrib/mp-buildbot/mpbb	2016-09-12 18:43:40 UTC (rev 152573)
@@ -113,14 +113,19 @@
 parseopt prefix:,work-dir: "$@" || exit
 
 # Use sensible defaults for options that weren't set on the command line.
-: "${option_port=}"
-: "${option_prefix=/opt/local}"
-: "${option_work_dir=${PWD:-/tmp/mp-buildbot}}"
+# shellcheck disable=SC2154
+{
+    : "${option_port=}"
+    : "${option_prefix=/opt/local}"
+    : "${option_work_dir=${PWD:-/tmp/mp-buildbot}}"
+}
 
-# shellcheck disable=SC2034 disable=SC2154
+# shellcheck disable=SC2034
 # Not really options, but pretend they are because they're global.
-option_jobs_dir=${option_work_dir}/infrastructure/jobs
-option_log_dir=${option_work_dir}/logs
+{
+    option_jobs_dir=${option_work_dir}/infrastructure/jobs
+    option_log_dir=${option_work_dir}/logs
+}
 
 # Inform the user if old repositories are still present.
 if [[ -d ${option_work_dir}/tools/.svn ]]; then
@@ -169,6 +174,7 @@
 for cmd in "${cmds[@]}"; do
     [[ $cmd == "$subcmd" ]] && break
 done
+# shellcheck disable=SC2181
 if (( $? != 0 || ${#cmds[@]} == 0 )); then
     err "Unknown command \`$cmd'"
     echo >&2 "Try \`$0 help' for more information."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160912/08565809/attachment.html>


More information about the macports-changes mailing list