Use [ -nt ] instead of stat -f%m to check cache files.

This commit is contained in:
Spencer Rinehart
2013-03-12 13:11:18 -04:00
parent 0ab0e67ecf
commit 300f94cb0e
4 changed files with 13 additions and 42 deletions

View File

@@ -1,17 +1,7 @@
stat -f%m . > /dev/null 2>&1
if [ "$?" = 0 ]; then
stat_cmd=(stat -f%m)
else
stat_cmd=(stat -L --format=%Y)
fi
_ant_does_target_list_need_generating () {
if [ ! -f .ant_targets ]; then return 0;
else
accurate=$($stat_cmd .ant_targets)
changed=$($stat_cmd build.xml)
return $(expr $accurate '>=' $changed)
fi
[ ! -f .ant_targets ] && return 0;
[ .ant_targets -nt build.xml ] && return 0;
return 1;
}
_ant () {