From 6ab35e7c87e11902fefcbf72214f7dd24dcbfcd7 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Fri, 25 Oct 2024 21:06:57 -0500 Subject: Inital packaging --- init | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'init') diff --git a/init b/init index 642d265..df9b983 100755 --- a/init +++ b/init @@ -1 +1,17 @@ #!/bin/sh -ex + +cp lpeg-packaging/*.rockspec lpeg +cd lpeg +luarocks config variables.CFLAGS " $CFLAGS" +luarocks make --pack-binary-rock lpeg-1.1.0-2.rockspec +obj="lpeg-1.1.0-2.$(luarocks config arch).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/* + upx --no-progress lib/* + zip -r "$obj" lib +fi -- cgit v1.2.3-55-g6feb