<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch variant-support
in repository mpbb.
</pre>
<p><a href="https://github.com/macports/mpbb/commit/3e1e6ea566ecba3e2415d025ac940e8f413277aa">https://github.com/macports/mpbb/commit/3e1e6ea566ecba3e2415d025ac940e8f413277aa</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 3e1e6ea566ecba3e2415d025ac940e8f413277aa
</span>Author: Clemens Lang <cal@macports.org>
AuthorDate: Sun Mar 11 16:37:45 2018 +0100
<span style='display:block; white-space:pre;color:#404040;'> Fix (or silence) install-port shellcheck warnings
</span>---
mpbb-install-port | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/mpbb-install-port b/mpbb-install-port
</span><span style='display:block; white-space:pre;color:#808080;'>index 0c25c28..ee1beab 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/mpbb-install-port
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/mpbb-install-port
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -34,7 +34,7 @@ install-port() {
</span> # prepare the log files and make sure to start with empty ones
mkdir -p "${option_log_dir}"
#> "$log_port_contents"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- > "$log_port_stats"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ :> "$log_port_stats"
</span>
# $option_prefix and $thisdir are set in mpbb
# shellcheck disable=SC2154
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -50,11 +50,10 @@ install-port() {
</span> local time_stop
time_start=$(date +%s)
# $option_prefix is set in mpbb
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # shellcheck disable=SC2154
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # shellcheck disable=SC2154,SC2086
</span> if "${option_prefix}/bin/port" -dkn install "$port" $portvariants; then
# Remove failcache if it exists
<span style='display:block; white-space:pre;background:#ffe0e0;'>- failcache_success "$@"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if [ $? -ne 0 ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ! failcache_success "$@"; then
</span> err "failcache_success" "$@" "failed."
return 1
fi
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -63,8 +62,7 @@ install-port() {
</span> # log: summary for the portwatcher
echo "Building '$port' ... [ERROR] maintainers: $(get-maintainers "$port")." >> "$log_subports_progress"
# update failcache
<span style='display:block; white-space:pre;background:#ffe0e0;'>- failcache_failure "$@"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if [ $? -ne 0 ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ! failcache_failure "$@"; then
</span> err "failcache_failure" "$@" "failed."
return 1
fi
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -87,9 +85,11 @@ install-port() {
</span> local print_arg_workdir="ERROR"
local print_arg_destdir="ERROR"
# First, compute port_workdir_size and port_destdir_size
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # shellcheck disable=SC2086
</span> port_workdir=$("${option_prefix}/bin/port" work "$port" $portvariants)
if [ -n "$port_workdir" ]; then
port_workdir_size=$(du -ks "$port_workdir" | sed 's/^ *//' | tr '\t' '\n' | head -n 1)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # shellcheck disable=SC2181
</span> if [ $? -eq 0 ] && [ -n "$port_workdir_size" ]; then
print_arg_workdir="${port_workdir_size}k"
fi
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -100,6 +100,7 @@ install-port() {
</span> print_arg_destdir="-"
if [ -d "$port_destdir" ]; then
port_destdir_size=$(du -ks "$port_destdir" | sed 's/^ *//' | tr '\t' '\n' | head -n 1)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # shellcheck disable=SC2181
</span> if [ $? -eq 0 ] && [ -n "$port_destdir_size" ]; then
print_arg_destdir="${port_destdir_size}k"
fi
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -112,7 +113,10 @@ install-port() {
</span>
# log: main.log
local port_mainlog
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # portvariants is not quoted on purpose
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # shellcheck disable=SC2086
</span> port_mainlog=$("${option_prefix}/bin/port" logfile "$port" $portvariants)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # shellcheck disable=SC2181
</span> if [ $? -eq 0 ] && [ -f "$port_mainlog" ]; then
cp -f "$port_mainlog" "$log_port_main"
fi
</pre><pre style='margin:0'>
</pre>