Support macos stat command in file2csource.sh.

This commit is contained in:
Alexander Shaduri
2021-12-01 14:51:59 +04:00
parent 235f79c88f
commit 71273f9021
+6 -1
View File
@@ -24,7 +24,12 @@ fi
in_file="$1";
out_file="$2";
sym_name="$3";
size=`stat -c "%s" "$in_file"`
size="";
if [[ $OSTYPE == 'darwin'* ]]; then
size=`stat "-f%z" "$in_file"`
else
size=`stat -c "%s" "$in_file"`
fi
# header. extern means "global" in this context (needed because const