#!/bin/sh EXTENSION=$(expr match $(basename $0) 'make_\(.*\)\.sh') VERSION=2.0.1 DOWNLOAD=http://luarocks.org/releases/luarocks-$VERSION.tar.gz #----------------------------------------------------------------------- # Download if necessary. [ -r /tmp/luarocks_$VERSION.tar.gz ] || wget -O- $DOWNLOAD >/tmp/luarocks_$VERSION.tar.gz # Unpack in /tmp/. cd /tmp tar xvzf /tmp/luarocks_$VERSION.tar.gz sudo -u tc tce-load -w -i lua.tcz sudo -u tc tce-load -w -i lua-dev.tcz # Make the package. cd /tmp/luarocks-$VERSION ./configure make clean make touch /tmp/TIMESTAMP if true ; then rm -fR /usr/local/etc/luarocks rm -fR /usr/local/share/lua/5.1/luarocks make install else make DESTDIR=/tmp/package install fi (cd / find usr/local -depth -not -type d -newer /tmp/TIMESTAMP | cpio -pud /tmp/package ) #----------------------------------------------------------------------- # Create luarocks.tcz.dep from the .dep files of dependent extensions. REP=http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tcz for E in lua lua-dev compiletc do echo $E.tcz ; wget -qO- $REP/$E.tcz.dep 2>/dev/null ; done | sort | uniq | grep -v '^ ' >/tmp/luarocks.tcz.dep # Create luarocks.tcz.info. cat >/tmp/luarocks.tcz.info <