#!/bin/sh tce-load -w compiletc sstrip squashfs-tools lua-dev tce-load -i compiletc sstrip squashfs-tools lua-dev cd /tmp wget http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.2.tar.gz tar x -zf lpeg-1.0.2.tar.gz cd lpeg-1.0.2 sed -i -e '/^COPT/ s/-O2/-flto -march=i486 -mtune=i686 -Os -pipe -fno-plt/'\ -e '/^LUADIR/ s_=.*$_= /usr/local/include/lua5.3_' makefile make linux sstrip lpeg.so mkdir -p /tmp/lpeg/usr/local/lib/lua/5.3 cp lpeg.so /tmp/lpeg/usr/local/lib/lua/5.3 DIRS="lpeg" for N in $DIRS do cd /tmp/"$N" find -not -type d > ../"$N".tcz.list sed -i -e 's/^\.//' ../"$N".tcz.list cd /tmp sudo chown -R root:root "$N" mksquashfs "$N" "$N".tcz md5sum "$N".tcz > "$N".tcz.md5.txt done