diff options
author | Robby Russell <robby@planetargon.com> | 2014-03-27 21:29:36 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2014-03-27 21:29:36 -0700 |
commit | 861d380aa38d2a6d9e70d9e8da1088fe1abe53b5 (patch) | |
tree | f95169f5ddb3023f46562cad1eb95bc50b38c78f | |
parent | 27c28a94af2eab2e307b86f73450e766bbb2bfff (diff) | |
parent | 48f8f2809bf96033f92f95384fa51749d6985dda (diff) | |
download | zsh-861d380aa38d2a6d9e70d9e8da1088fe1abe53b5.tar.gz zsh-861d380aa38d2a6d9e70d9e8da1088fe1abe53b5.tar.bz2 zsh-861d380aa38d2a6d9e70d9e8da1088fe1abe53b5.zip |
Merge pull request #2658 from leifcr/rake-fast-issue
Plugin: Rake-fast: Support both *nix and Darwin
-rw-r--r-- | plugins/rake-fast/rake-fast.plugin.zsh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/rake-fast/rake-fast.plugin.zsh b/plugins/rake-fast/rake-fast.plugin.zsh index 545b6c049..cb84f69a1 100644 --- a/plugins/rake-fast/rake-fast.plugin.zsh +++ b/plugins/rake-fast/rake-fast.plugin.zsh @@ -10,8 +10,13 @@ _rake_refresh () { _rake_does_task_list_need_generating () { if [ ! -f .rake_tasks ]; then return 0; else - accurate=$(stat -f%m .rake_tasks) - changed=$(stat -f%m Rakefile) + if [[ $(uname -s) == 'Darwin' ]]; then + accurate=$(stat -f%m .rake_tasks) + changed=$(stat -f%m Rakefile) + else + accurate=$(stat -c%Y .rake_tasks) + changed=$(stat -c%Y Rakefile) + fi return $(expr $accurate '>=' $changed) fi } |