diff options
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-x | radar-base.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/radar-base.sh b/radar-base.sh index 649978f..5ea2a0f 100755 --- a/radar-base.sh +++ b/radar-base.sh @@ -174,7 +174,12 @@ record_timestamp() { timestamp() { if is_repo; then - printf '%s' "$($(stat_type) -c%Y "$(dot_git)/lastupdatetime" 2>/dev/null || printf '%s' "0")" + if [[ $OSTYPE == darwin* ]];then + printf '%s' "$(stat -f%m "$(dot_git)/lastupdatetime" 2>/dev/null || printf '%s' "0")" + else + printf '%s' "$(stat -c %Y "$(dot_git)/lastupdatetime" 2>/dev/null || printf '%s' "0")" + fi; + fi } |