File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 33curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/ci-build.sh
44sh ci-build.sh
55
6+ # Helper method to get the last cache modified date as seconds since epoch
7+ last_cache_modified () {
8+ cache_modified=$( find ~ /.cache/scijava/melting-pot -printf ' %T@\n' | sort -r | head -n1)
9+ cache_modified=${cache_modified% .* }
10+ echo " $cache_modified "
11+ }
12+
613# Record the last time of cache modification before running melting-pot
714cache_modified_pre=0
815cache_modified_post=0
916
1017if [ -f " ~/.cache/scijava/melting-pot" ]; then
11- cache_modified_pre=$( find ~ /.cache/scijava/melting-pot -printf ' %T@\n' | sort -r | head -n 1)
12- cache_modified_pre=${cache_modified_pre% .* }
18+ cache_modified_pre=$( last_cache_modified)
1319fi
1420
1521# run melting-pot
1622tests/run.sh
1723
1824# Record the last time of cache modification after running melting-pot
1925if [ -f " ~/.cache/scijava/melting-pot" ]; then
20- cache_modified_post=$( find ~ /.cache/scijava/melting-pot -printf ' %T@\n' | sort -r | head -n 1)
21- cache_modified_post=${cache_modified_post% .* }
26+ cache_modified_post=$( last_cache_modified)
2227fi
2328
2429# Determine if cache needs to be re-generated
You can’t perform that action at this time.
0 commit comments