From 72ec490dbd079556d2b043d65d63405fb1cc1a3b Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Mon, 19 Aug 2024 12:24:53 -0500 Subject: Pack distributables for release builds --- init | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'init') diff --git a/init b/init index 010113c..4c3a926 100755 --- a/init +++ b/init @@ -3,4 +3,16 @@ cd luafilesystem luarocks config variables.CFLAGS " $CFLAGS" luarocks make --pack-binary-rock luafilesystem-scm-1.rockspec -cp luafilesystem-scm-1.mingw32-x86_64.rock /root +ojb="luafilesystem-scm-1.$(luarocks config arch).rock" +cp $obj /root +cd /root +if [ -n $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then + # Debug build +else + # Release build, delete docs/ and tests/ + zip -d $obj docs/ docs/* tests/ tests/* + # And pack the library + unzip $obj lib/* + upx lib/* + zip -r -u $obj lib +fi -- cgit v1.2.3-55-g6feb