tests: OSX compat: use OSX-style "stat -f"

Reported at https://github.com/rfjakob/gocryptfs/issues/15#issuecomment-279130217
This commit is contained in:
Jakob Unterwurzacher 2017-02-16 19:09:54 +01:00
parent 9f6841373d
commit e5bee6a6aa

View File

@ -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