diff options
Diffstat (limited to 'bit32')
| -rwxr-xr-x | bit32 | 18 |
1 files changed, 18 insertions, 0 deletions
| @@ -0,0 +1,18 @@ | |||
| 1 | #!/bin/sh -ex | ||
| 2 | |||
| 3 | cd lua-compat-5.3 | ||
| 4 | cp rockspecs/bit32-scm-1.rockspec . | ||
| 5 | luarocks config variables.CFLAGS " $CFLAGS" | ||
| 6 | luarocks make --pack-binary-rock bit32-scm-1.rockspec | ||
| 7 | obj="bit32-scm-1.$(luarocks config arch).rock" | ||
| 8 | cp $obj /root | ||
| 9 | cd /root | ||
| 10 | if [ -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 | ||
| 18 | fi | ||
