summaryrefslogtreecommitdiff
path: root/bit32
diff options
context:
space:
mode:
Diffstat (limited to 'bit32')
-rwxr-xr-xbit3218
1 files changed, 18 insertions, 0 deletions
diff --git a/bit32 b/bit32
new file mode 100755
index 0000000..90534bd
--- /dev/null
+++ b/bit32
@@ -0,0 +1,18 @@
1#!/bin/sh -ex
2
3cd lua-compat-5.3
4cp rockspecs/bit32-scm-1.rockspec .
5luarocks config variables.CFLAGS " $CFLAGS"
6luarocks make --pack-binary-rock bit32-scm-1.rockspec
7obj="bit32-scm-1.$(luarocks config arch).rock"
8cp $obj /root
9cd /root
10if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then
11 # Release build, delete docs/ and tests/
12 zip -d $obj doc/ doc/*
13 # And pack the library with upx
14 unzip $obj lib/*
15 upx --no-progress lib/*
16 zip -r "$obj" lib
17 rm -rf lib
18fi