#!/bin/sh -ex cp luaossl-packaging/luaossl-git.rockspec luaossl cd luaossl luarocks config variables.CFLAGS " $CFLAGS" luarocks make --pack-binary-rock luafilesystem-scm-1.rockspec obj="luaossl-git.$(luarocks config arch).rock" cp $obj /root cd /root if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then # And pack the library with upx unzip $obj lib/* upx --no-progress lib/* zip -r "$obj" lib fi