Merge branch 'macOS-gdu' into 'master'

Use gdu on macOS

See merge request alexjgriffith/min-love2d-fennel!14
This commit is contained in:
Alexander Griffith 2022-03-25 23:44:37 +00:00
commit 67ca04f967

View file

@ -44,6 +44,13 @@ if [ "$#" -lt "2" ]
exit 1 exit 1
fi fi
# use gdu on macOS, fixes 'invalid option -b' error
if [ "$(uname -s)" = "Darwin" ]; then
DU_CMD=gdu
else
DU_CMD=du
fi
love_file=$1 love_file=$1
name=$2 name=$2
## confirm that $release_dir/$name-$version.love exists ## confirm that $release_dir/$name-$version.love exists
@ -70,7 +77,7 @@ love_version="11.4"
canvas_colour="54,69,79" canvas_colour="54,69,79"
text_colour="240,234,214" text_colour="240,234,214"
initial_memory=0 initial_memory=0
module_size=$(du -b $love_file | awk '{print $1}') module_size=$($DU_CMD -b $love_file | awk '{print $1}')
title=$(echo $name | sed -r 's/\<./\U&/g' | sed -r 's/-/\ /g') title=$(echo $name | sed -r 's/\<./\U&/g' | sed -r 's/-/\ /g')
version="" version=""
dash_version="" dash_version=""