stat is different for macos

This commit is contained in:
Yakov Olkhovskiy 2022-08-02 15:39:11 -04:00 committed by GitHub
parent 70d97e9393
commit 504180d7d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,7 @@
padding=" "
sz="$(stat -c %s 'decompressor')"
if [[ $OSTYPE == 'darwin'* ]]; then
sz="$(stat -f %z 'decompressor')"
else
sz="$(stat -c %s 'decompressor')"
fi
printf "%s%s" "${padding:${#sz}}" $sz