diff options
author | Alexander M Pickering <alex@cogarr.net> | 2024-09-09 11:33:52 -0500 |
---|---|---|
committer | Alexander M Pickering <alex@cogarr.net> | 2024-09-09 11:33:52 -0500 |
commit | 70c3c15d792145a42ea4b666703fc0813d40f4cf (patch) | |
tree | 27a488c89a1b59434cdf7c2674ebafcd4e26fd7e /init | |
parent | 5ebdf4809e6e9ea0b8b478e995792e789f9c6292 (diff) | |
download | lua-cjson-packaging-master.tar.gz lua-cjson-packaging-master.tar.bz2 lua-cjson-packaging-master.zip |
Diffstat (limited to 'init')
-rwxr-xr-x | init | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -1 +1,16 @@ | |||
1 | #!/bin/sh -ex | 1 | #!/bin/sh -ex |
2 | |||
3 | cd lua-cjson | ||
4 | luarocks config variables.CFLAGS " $CFLAGS" | ||
5 | luarocks make --pack-binary-rock *.rockspec | ||
6 | obj=$(ls *.rock) | ||
7 | cp $obj /root | ||
8 | cd /root | ||
9 | if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then | ||
10 | # Release build, delete docs/ and tests/ | ||
11 | zip -d $obj docs/ docs/* tests/ tests/* | ||
12 | # And pack the library with upx | ||
13 | unzip $obj lib/* | ||
14 | find lib -type f | xargs upx --no-progress | ||
15 | zip -r "$obj" lib | ||
16 | fi | ||