# toLua 5.2.4
# ===========
# I have not used this in a long time, and was not able to build this
# against Lua 5.4.6, so it's just here for future reference...
# Get the source
cd
test -f installed/tolua-5.2.4.tar.gz && mv installed/tolua-5.2.4.tar.gz .
test ! -f tolua-5.2.4.tar.gz &&
wget https://web.tecgraf.puc-rio.br/~celes/tolua/tolua-5.2.4.tar.gz
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "tolua-*" -exec rm -r {} \;
tar xzvf ~/tolua-5.2.4.tar.gz
cd tolua-5.2.4
test $UID = 0 && chown -R root:root .
# Open config in a text editor, make any necessary changes
# Change lib to lib64 if 64-bit
# I had to add '-ldl' to the LUALIB line in a previous version
# If you ever want to uninstall tolua, this should do it:
su
rm -f /usr/local/bin/tolua /usr/local/lib/libtolua.a \
/usr/local/include/tolua.h
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "tolua-*" -exec rm -r {} \;
rm -f ~/installed/tolua-*.tar.*