Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 38 lines (30 sloc) 0.822 kB
#!/bin/bash
if [ $1 == "--help" ]; then
echo "Usage: configure lua51"
echo "where lua51 is the name of your Lua executable"
exit 0
fi
echo "Trying to find where you installed Lua..."
if [ $1 != "" ]; then
lua=$1
else
lua="lua51"
fi
lua_bin=`which $lua`
lua_bin_dir=`dirname $lua_bin`
lua_root=`dirname $lua_bin_dir`
if [ $lua_root != "" ]; then
echo "Lua is in $lua_root"
echo "Writing config"
lua_share=$lua_root/share/lua/5.1
lua_lib=$lua_root/lib/lua/5.1
bin_dir=$lua_root/bin
echo "LUA_BIN ?= $lua_bin" > config
echo "LUA_DIR ?= $lua_share" >> config
echo "BIN_DIR ?= $bin_dir" >> config
echo "LUA_LIBDIR ?= $lua_lib" >> config
echo "DESTDIR ?= /" >> config
echo "Now run 'make && sudo make install'"
else
echo "Lua not found, please install Lua 5.1 (and put in your PATH)"
fi
Jump to Line
Something went wrong with that request. Please try again.