diff options
author | Claudio Bandera <claudio.bandera@kit.edu> | 2015-09-17 20:41:00 +0200 |
---|---|---|
committer | Claudio Bandera <claudio.bandera@kit.edu> | 2015-09-17 20:41:00 +0200 |
commit | a7f6b47969e9c734ff28f5b49fdbbee6a6095b93 (patch) | |
tree | 585f34ad40cde83094a9b8f80b97e9e29155a4b6 | |
parent | e692cbc483f8ee4b4666143fe1b3cfbd86e7681f (diff) | |
download | git-sonar-a7f6b47969e9c734ff28f5b49fdbbee6a6095b93.tar.gz git-sonar-a7f6b47969e9c734ff28f5b49fdbbee6a6095b93.zip |
Found another difference in syntax
-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 } |