Merge pull request #1 from GregWildman/master

Use the correct stat command for macos and linux
This commit is contained in:
4am 2019-07-25 12:49:15 -04:00 committed by GitHub
commit d725812bc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,10 @@
totalsize=$1
outfile=$2
filesize=`stat -f "%z" "$outfile"`
[[ "$OSTYPE" == "linux-gnu" ]] \
&& filesize=$(stat -c "%s" "$outfile") \
|| filesize=$(stat -f "%z" "$outfile")
padsize=$((512-$filesize))
dd if=/dev/zero bs=1 count=$padsize >> "$outfile"