diff options
author | Claudio Bandera <claudio.bandera@kit.edu> | 2015-09-17 20:35:34 +0200 |
---|---|---|
committer | Claudio Bandera <claudio.bandera@kit.edu> | 2015-09-17 20:35:34 +0200 |
commit | e692cbc483f8ee4b4666143fe1b3cfbd86e7681f (patch) | |
tree | 7a34df331cf3495d585ab94080a953b66e823efe /test-directories.sh | |
parent | 92c2e869763dcc25c840c2e6cfcd9863abf201dd (diff) | |
download | git-sonar-e692cbc483f8ee4b4666143fe1b3cfbd86e7681f.tar.gz git-sonar-e692cbc483f8ee4b4666143fe1b3cfbd86e7681f.zip |
Added switch case for OS type in tests
Diffstat (limited to '')
-rwxr-xr-x | test-directories.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test-directories.sh b/test-directories.sh index 83c408f..1777e69 100755 --- a/test-directories.sh +++ b/test-directories.sh @@ -64,8 +64,12 @@ test_record_timestamp_in_repo() { test_time_to_update_when_timestamp_is_old() { cd $scriptDir - newtimestamp=$(date -d "now -1 hour" +%Y%m%d%H%M) - touch -t $newtimestamp "$(dot_git)/lastupdatetime" + if [[ $OSTYPE == darwin* ]];then + touch -A "-010000" "$(dot_git)/lastupdatetime" + else + newtimestamp=$(date -d "now -1 hour" +%Y%m%d%H%M) + touch -t $newtimestamp "$(dot_git)/lastupdatetime" + fi; assertTrue time_to_update } |