mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
Merge 5412176a43 into 23da49ee5b
This commit is contained in:
commit
ca4665a81d
2 changed files with 15 additions and 3 deletions
|
|
@ -277,6 +277,11 @@ echo "::endgroup::"
|
|||
if [[ $USE_CCACHE ]]; then
|
||||
if [[ $CCACHE_EVICTION_AGE ]]; then
|
||||
echo "::group::evict ccache files older than $CCACHE_EVICTION_AGE"
|
||||
ccache_dir=$(ccache --get-config cache_dir)
|
||||
mapfile -t timestamps < <(find "$ccache_dir" -name CACHEDIR.TAG -prune -o -type f -printf '%T+\n' | sort)
|
||||
filecount=${#timestamps[@]}
|
||||
oldest_file=${timestamps[0]}
|
||||
echo "the oldest file before deletion is from $oldest_file out of $filecount files in $ccache_dir"
|
||||
ccache --evict-older-than "$CCACHE_EVICTION_AGE"
|
||||
echo "::endgroup::"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue