diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2024-10-25 21:06:57 -0500 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2024-10-25 21:06:57 -0500 |
| commit | 6ab35e7c87e11902fefcbf72214f7dd24dcbfcd7 (patch) | |
| tree | ade6f859da4bcd2ad9bae131d063f8d1d0fef4b6 /init | |
| parent | 441b1014065e28cfb0b5a6bfa0ca879bb1424e18 (diff) | |
| download | lpeg-packaging-6ab35e7c87e11902fefcbf72214f7dd24dcbfcd7.tar.gz lpeg-packaging-6ab35e7c87e11902fefcbf72214f7dd24dcbfcd7.tar.bz2 lpeg-packaging-6ab35e7c87e11902fefcbf72214f7dd24dcbfcd7.zip | |
Inital packaging
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 | ||
