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