summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Bandera <claudio.bandera@kit.edu>2015-09-17 20:41:00 +0200
committerClaudio Bandera <claudio.bandera@kit.edu>2015-09-17 20:41:00 +0200
commita7f6b47969e9c734ff28f5b49fdbbee6a6095b93 (patch)
tree585f34ad40cde83094a9b8f80b97e9e29155a4b6
parente692cbc483f8ee4b4666143fe1b3cfbd86e7681f (diff)
downloadgit-sonar-a7f6b47969e9c734ff28f5b49fdbbee6a6095b93.tar.gz
git-sonar-a7f6b47969e9c734ff28f5b49fdbbee6a6095b93.zip
Found another difference in syntax
-rwxr-xr-xradar-base.sh7
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
}