diff options
-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 41f4512..f346b26 100755 --- a/radar-base.sh +++ b/radar-base.sh @@ -131,7 +131,12 @@ record_timestamp() { timestamp() { if is_repo; then - printf '%s' "$(stat -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 } |