Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow deleting distfiles if distfiles is a symlink #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mpbb-cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ cleanup() {
# $thisdir is set by mpbb and points to the directory in which this script resides
# shellcheck disable=SC2154
"$(readlink "${option_prefix}/bin/port-tclsh")" "${thisdir}/tools/uninstall-unneeded-ports.tcl"
if [ ! -L "${option_prefix}/var/macports/distfiles" ]; then
if [ ! -e "${option_prefix}/var/macports/distfiles/ports.tar.gz" ]; then
echo
echo "----> Deleting distfiles"
find "${option_prefix}/var/macports/distfiles" -type f \! -newerat "4 hours ago" -print -delete | sed -E 's/^/Deleting distfile /'
find "${option_prefix}/var/macports/distfiles" -type d -mindepth 1 -empty -print -delete | sed -E 's/^/Deleting directory /'
find "${option_prefix}/var/macports/distfiles/" -type f \! -newerat "4 hours ago" -print -delete | sed -E 's/^/Deleting distfile /'
find "${option_prefix}/var/macports/distfiles/" -type d -mindepth 1 -empty -print -delete | sed -E 's/^/Deleting directory /'
fi
# clean out failcache at most once every week
timestamp="${option_work_dir}/failcache-cleanup.timestamp"
Expand Down