summaryrefslogtreecommitdiff
path: root/plugins/ant
diff options
context:
space:
mode:
authorSpencer Rinehart <anubis@overthemonkey.com>2013-03-12 13:11:18 -0400
committerSpencer Rinehart <anubis@overthemonkey.com>2013-03-12 13:23:30 -0400
commit300f94cb0e1121e7796edbedcbc6d686e755be5b (patch)
treea79be9894b339fc270042c5023fa536c0580be1e /plugins/ant
parent0ab0e67ecfc52b4779b700149a9c51feeb05318e (diff)
downloadzsh-300f94cb0e1121e7796edbedcbc6d686e755be5b.tar.gz
zsh-300f94cb0e1121e7796edbedcbc6d686e755be5b.tar.bz2
zsh-300f94cb0e1121e7796edbedcbc6d686e755be5b.zip
Use [ -nt ] instead of stat -f%m to check cache files.
Diffstat (limited to 'plugins/ant')
-rw-r--r--plugins/ant/ant.plugin.zsh16
1 files changed, 3 insertions, 13 deletions
diff --git a/plugins/ant/ant.plugin.zsh b/plugins/ant/ant.plugin.zsh
index 691d4d2db..45f2b06eb 100644
--- a/plugins/ant/ant.plugin.zsh
+++ b/plugins/ant/ant.plugin.zsh
@@ -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 () {