diff options
author | Reza <reza@balatarin.com> | 2012-09-03 21:20:45 +0430 |
---|---|---|
committer | Reza <reza@balatarin.com> | 2012-09-03 21:20:45 +0430 |
commit | cfeb57024d78d84521ea6676a49182dee9a98b52 (patch) | |
tree | a4b9df16a9b6b5c74d935c31c2e8998e8d821301 /plugins/capistrano | |
parent | efa5593f88e552fbd3fde850b283fa43d36f481c (diff) | |
download | zsh-cfeb57024d78d84521ea6676a49182dee9a98b52.tar.gz zsh-cfeb57024d78d84521ea6676a49182dee9a98b52.tar.bz2 zsh-cfeb57024d78d84521ea6676a49182dee9a98b52.zip |
Nuke _cap_does_task_list_need_generating
Thanks @docwhat
Diffstat (limited to 'plugins/capistrano')
-rw-r--r-- | plugins/capistrano/_capistrano | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/plugins/capistrano/_capistrano b/plugins/capistrano/_capistrano index 2ae977fcd..cf6b50c7f 100644 --- a/plugins/capistrano/_capistrano +++ b/plugins/capistrano/_capistrano @@ -1,17 +1,8 @@ #compdef cap #autoload -_cap_does_task_list_need_generating () { - if [ ! -f .cap_tasks~ ]; then return 0; - else - accurate=$(stat -f%m .cap_tasks~) - changed=$(stat -f%m config/deploy.rb) - return $(expr $accurate '>=' $changed) - fi -} - if [ -f config/deploy.rb ]; then - if _cap_does_task_list_need_generating; then + if [[ ! -f .cap_tasks~ || config/deploy.rb -nt .cap_tasks~ ]]; then echo "\nGenerating .cap_tasks~..." > /dev/stderr cap --tasks | grep '#' | cut -d " " -f 2 > .cap_tasks~ fi |