<pre style='margin:0'>
Lawrence Velázquez (larryv) pushed a commit to branch mprsyncup-polish
in repository macports-infrastructure.
</pre>
<p><a href="https://github.com/macports/macports-infrastructure/commit/3c3df74a6f8facfd31819e449698f7aa4cfd7816">https://github.com/macports/macports-infrastructure/commit/3c3df74a6f8facfd31819e449698f7aa4cfd7816</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 3c3df74a6f8facfd31819e449698f7aa4cfd7816
</span>Author: Lawrence Velázquez <larryv@macports.org>
AuthorDate: Wed Nov 16 17:36:31 2016 -0500
<span style='display:block; white-space:pre;color:#404040;'> mprsyncup: Use awk to prefix portindex output
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> POSIX shell doesn't recognize $'...' quoting. Replace sed with awk so we
</span><span style='display:block; white-space:pre;color:#404040;'> can keep using "\t" instead of a literal TAB character. This also lets
</span><span style='display:block; white-space:pre;color:#404040;'> us insert $INDEX without resorting to what was basically code injection.
</span>---
jobs/mprsyncup | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/jobs/mprsyncup b/jobs/mprsyncup
</span><span style='display:block; white-space:pre;color:#808080;'>index 50a42ae..0a90f78 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/jobs/mprsyncup
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/jobs/mprsyncup
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -41,6 +41,7 @@ MV="/opt/local/bin/gmv"
</span> LN="/bin/ln"
TAR="/usr/bin/tar"
OPENSSL="/usr/bin/openssl"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+AWK="/usr/bin/awk"
</span> SED="/usr/bin/sed"
STAT="/opt/local/bin/gstat"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -175,7 +176,7 @@ if [ "${PORTS_CHANGED}" -eq 1 ]; then
</span> # Intentionally split PLATFORMS on whitespace.
for PLATFORM in $PLATFORMS; do
INDEX="PortIndex_darwin_${PLATFORM}"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- ${PORTINDEX} -p "macosx_${PLATFORM}" -o "${INDEX}" | ${SED} "s/^/Updating ${INDEX}:"$'\t'"/" | expand -t 40,48,56,64,72,80 &
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${PORTINDEX} -p "macosx_${PLATFORM}" -o "${INDEX}" | ${AWK} '{ print "Updating " idx ":\t" $0 }' idx="$INDEX" | expand -t 40,48,56,64,72,80 &
</span> PIDS+=($!)
done
for PID in ${PIDS[*]}; do
</pre><pre style='margin:0'>
</pre>