diff options
author | Robby Russell <robby@planetargon.com> | 2013-04-07 19:05:59 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2013-04-07 19:05:59 -0700 |
commit | dda1154c80ec0b8ad02846240e4c5d701279b296 (patch) | |
tree | 7f50747e55f49c431cae2e51ffcf189300fb571a /plugins/cake/cake.plugin.zsh | |
parent | e041b5074243b549b4c16dc9f0d4b6bd33457a46 (diff) | |
parent | bdf4f5a347789069dda438e64467344b551fff00 (diff) | |
download | zsh-dda1154c80ec0b8ad02846240e4c5d701279b296.tar.gz zsh-dda1154c80ec0b8ad02846240e4c5d701279b296.tar.bz2 zsh-dda1154c80ec0b8ad02846240e4c5d701279b296.zip |
Merge pull request #1655 from nubs/phing-and-cache-files
Improve portability of cache file detection for command targets
Diffstat (limited to 'plugins/cake/cake.plugin.zsh')
-rw-r--r-- | plugins/cake/cake.plugin.zsh | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/cake/cake.plugin.zsh b/plugins/cake/cake.plugin.zsh index 1d0d196ee..44cc47470 100644 --- a/plugins/cake/cake.plugin.zsh +++ b/plugins/cake/cake.plugin.zsh @@ -14,12 +14,9 @@ _cake_does_target_list_need_generating () { return 1; fi - if [ ! -f ${_cake_task_cache_file} ]; then return 0; - else - accurate=$(stat -f%m $_cake_task_cache_file) - changed=$(stat -f%m Cakefile) - return $(expr $accurate '>=' $changed) - fi + [ ! -f ${_cake_task_cache_file} ] && return 0; + [ ${_cake_task_cache_file} -nt Cakefile ] && return 0; + return 1; } _cake () { @@ -33,4 +30,4 @@ _cake () { fi } -compdef _cake cake
\ No newline at end of file +compdef _cake cake |