summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-02-16 19:09:54 +0100
committerJakob Unterwurzacher2017-02-16 19:10:36 +0100
commite5bee6a6aaa1e5be2a45b16526f65d4ed6b0d8fe (patch)
treed63ca6d73bc57149e6df5782d7236b78cf614ca2 /tests
parent9f6841373d539b0cf04b78e0ec520e9c66c6b3c1 (diff)
tests: OSX compat: use OSX-style "stat -f"
Reported at https://github.com/rfjakob/gocryptfs/issues/15#issuecomment-279130217
Diffstat (limited to 'tests')
-rwxr-xr-xtests/dl-linux-tarball.bash7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/dl-linux-tarball.bash b/tests/dl-linux-tarball.bash
index 9fd8534..5c08b04 100755
--- a/tests/dl-linux-tarball.bash
+++ b/tests/dl-linux-tarball.bash
@@ -8,7 +8,12 @@ TGZ=/tmp/linux-3.0.tar.gz
SIZE_WANT=96675825
SIZE_ACTUAL=0
if [[ -e $TGZ ]]; then
- SIZE_ACTUAL=$(stat -c %s $TGZ)
+ if [[ $OSTYPE == linux* ]] ; then
+ SIZE_ACTUAL=$(stat -c %s $TGZ)
+ else
+ # Mac OS X
+ SIZE_ACTUAL=$(stat -f %z $TGZ)
+ fi
fi
if [[ $SIZE_ACTUAL -ne $SIZE_WANT ]]; then