diff options
Diffstat (limited to 'init')
| -rwxr-xr-x | init | 16 |
1 files changed, 16 insertions, 0 deletions
| @@ -1 +1,17 @@ | |||
| 1 | #!/bin/sh -ex | 1 | #!/bin/sh -ex |
| 2 | |||
| 3 | cp lpeg-packaging/*.rockspec lpeg | ||
| 4 | cd lpeg | ||
| 5 | luarocks config variables.CFLAGS " $CFLAGS" | ||
| 6 | luarocks make --pack-binary-rock lpeg-1.1.0-2.rockspec | ||
| 7 | obj="lpeg-1.1.0-2.$(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 docs/ docs/* tests/ tests/* | ||
| 13 | # And pack the library with upx | ||
| 14 | unzip $obj lib/* | ||
| 15 | upx --no-progress lib/* | ||
| 16 | zip -r "$obj" lib | ||
| 17 | fi | ||
