Skip to content

Commit 3a55950

Browse files
committed
ccache-cleanlock.sh: make TOO_OLD setting tunable
1 parent bc41077 commit 3a55950

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ccache-cleanlock.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ TZ=UTC
2222
export TZ LANG LC_ALL
2323

2424
# How long can a decent compilation of one file take? Even on a truck worker?
25-
# Complain (exit 42) in listing if we see lock files older than this (sec):
26-
TOO_OLD=120
25+
# Complain (exit 42) in listing if we see lock files older than this (sec).
26+
# Also do not remove lock files younger than this, only report them if seen.
27+
[ -n "$TOO_OLD" ] && [ "$TOO_OLD" -ge 0 ] || TOO_OLD=120
2728

2829
# Hint: for a massive cleanup, can set CLEANHOST=. or another regex to match
2930
# In worst cases, try: find . -name 'stats.lock*' -type l -exec rm -f '{}' \;

0 commit comments

Comments
 (0)