summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-10-25 21:06:57 -0500
committerAlexander M Pickering <alex@cogarr.net>2024-10-25 21:06:57 -0500
commit6ab35e7c87e11902fefcbf72214f7dd24dcbfcd7 (patch)
treeade6f859da4bcd2ad9bae131d063f8d1d0fef4b6 /init
parent441b1014065e28cfb0b5a6bfa0ca879bb1424e18 (diff)
downloadlpeg-packaging-6ab35e7c87e11902fefcbf72214f7dd24dcbfcd7.tar.gz
lpeg-packaging-6ab35e7c87e11902fefcbf72214f7dd24dcbfcd7.tar.bz2
lpeg-packaging-6ab35e7c87e11902fefcbf72214f7dd24dcbfcd7.zip
Inital packaging
Diffstat (limited to 'init')
-rwxr-xr-xinit16
1 files changed, 16 insertions, 0 deletions
diff --git a/init b/init
index 642d265..df9b983 100755
--- a/init
+++ b/init
@@ -1 +1,17 @@
1#!/bin/sh -ex 1#!/bin/sh -ex
2
3cp lpeg-packaging/*.rockspec lpeg
4cd lpeg
5luarocks config variables.CFLAGS " $CFLAGS"
6luarocks make --pack-binary-rock lpeg-1.1.0-2.rockspec
7obj="lpeg-1.1.0-2.$(luarocks config arch).rock"
8cp $obj /root
9cd /root
10if [ -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
17fi