From 70c3c15d792145a42ea4b666703fc0813d40f4cf Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Mon, 9 Sep 2024 11:33:52 -0500 Subject: Add build --- init | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'init') diff --git a/init b/init index 642d265..2e6353a 100755 --- a/init +++ b/init @@ -1 +1,16 @@ #!/bin/sh -ex + +cd lua-cjson +luarocks config variables.CFLAGS " $CFLAGS" +luarocks make --pack-binary-rock *.rockspec +obj=$(ls *.rock) +cp $obj /root +cd /root +if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then + # Release build, delete docs/ and tests/ + zip -d $obj docs/ docs/* tests/ tests/* + # And pack the library with upx + unzip $obj lib/* + find lib -type f | xargs upx --no-progress + zip -r "$obj" lib +fi -- cgit v1.2.3-55-g6feb