<pre style='margin:0'>
Ryan Schmidt (ryandesign) pushed a commit to branch master
in repository mpbb.
</pre>
<p><a href="https://github.com/macports/mpbb/commit/f15133325b25d8bed3ac8afe5f48b2b64fb4c09e">https://github.com/macports/mpbb/commit/f15133325b25d8bed3ac8afe5f48b2b64fb4c09e</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit f15133325b25d8bed3ac8afe5f48b2b64fb4c09e
</span>Author: Ryan Schmidt <ryandesign@macports.org>
AuthorDate: Wed Mar 7 08:42:10 2018 -0600
<span style='display:block; white-space:pre;color:#404040;'> Don't cleanup distfiles if distfiles is a symlink
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> It might be a symlink to the master distfiles mirror and we don't want
</span><span style='display:block; white-space:pre;color:#404040;'> to risk deleting that.
</span>---
mpbb-cleanup | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/mpbb-cleanup b/mpbb-cleanup
</span><span style='display:block; white-space:pre;color:#808080;'>index 9c5a1a5..78e39c6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/mpbb-cleanup
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/mpbb-cleanup
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -38,10 +38,12 @@ cleanup() {
</span> # $thisdir is set by mpbb and points to the directory in which this script resides
# shellcheck disable=SC2154
"${option_prefix}/bin/port-tclsh" "${thisdir}/tools/uninstall-old-ports.tcl"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- echo
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- echo "----> Deleting distfiles"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- find "${option_prefix}/var/macports/distfiles" -type f -mtime +1 -print -delete | sed -E 's/^/Deleting distfile /'
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- find "${option_prefix}/var/macports/distfiles" -type d -mindepth 1 -empty -print -delete | sed -E 's/^/Deleting directory /'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if [ ! -L "${option_prefix}/var/macports/distfiles" ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo "----> Deleting distfiles"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ find "${option_prefix}/var/macports/distfiles" -type f -mtime +1 -print -delete | sed -E 's/^/Deleting distfile /'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ find "${option_prefix}/var/macports/distfiles" -type d -mindepth 1 -empty -print -delete | sed -E 's/^/Deleting directory /'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span> echo
for dir in build logs; do
echo "----> Deleting ${dir}"
</pre><pre style='margin:0'>
</pre>