mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-07 16:00:41 +01:00
Use [ -nt ] instead of stat -f%m to check cache files.
This commit is contained in:
@@ -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
|
||||
compdef _cake cake
|
||||
|
||||
Reference in New Issue
Block a user