summaryrefslogtreecommitdiff
path: root/init
blob: 2e6353a202a2fb5fa8163a57bc6ac6248929df9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh -ex

cd lua-cjson
luarocks config variables.CFLAGS " $CFLAGS"
luarocks make --pack-binary-rock *.rockspec
obj=$(ls *.rock)
cp $obj /root
cd /root
if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then
  # Release build, delete docs/ and tests/
  zip -d $obj docs/ docs/* tests/ tests/*
  # And pack the library with upx
  unzip $obj lib/*
  find lib -type f | xargs upx --no-progress
  zip -r "$obj" lib
fi