All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
3 # A script for setting up environment for travis-ci testing.
4 # Sets up Lua and Luarocks.
5 # LUA must be "lua5.1", "lua5.2" or "luajit".
6 # luajit2.0 - master v2.0
7 # luajit2.1 - master v2.1
11 LUAJIT_BASE="LuaJIT-2.0.4"
13 source .travis/platform.sh
15 LUA_HOME_DIR=$TRAVIS_BUILD_DIR/install/lua
17 LR_HOME_DIR=$TRAVIS_BUILD_DIR/install/luarocks
23 if [ "$PLATFORM" == "macosx" ]; then
24 if [ "$LUA" == "luajit" ]; then
27 if [ "$LUA" == "luajit2.0" ]; then
30 if [ "$LUA" == "luajit2.1" ]; then
33 elif [ "$(expr substr $LUA 1 6)" == "luajit" ]; then
37 mkdir -p "$LUA_HOME_DIR"
39 if [ "$LUAJIT" == "yes" ]; then
41 if [ "$LUA" == "luajit" ]; then
42 curl http://luajit.org/download/$LUAJIT_BASE.tar.gz | tar xz;
44 git clone http://luajit.org/git/luajit-2.0.git $LUAJIT_BASE;
49 if [ "$LUA" == "luajit2.1" ]; then
51 # force the INSTALL_TNAME to be luajit
52 perl -i -pe 's/INSTALL_TNAME=.+/INSTALL_TNAME= luajit/' Makefile
55 make && make install PREFIX="$LUA_HOME_DIR"
57 ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/luajit
58 ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/lua;
62 if [ "$LUA" == "lua5.1" ]; then
63 curl http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz
65 elif [ "$LUA" == "lua5.2" ]; then
66 curl http://www.lua.org/ftp/lua-5.2.4.tar.gz | tar xz
68 elif [ "$LUA" == "lua5.3" ]; then
69 curl http://www.lua.org/ftp/lua-5.3.1.tar.gz | tar xz
73 # Build Lua without backwards compatibility for testing
74 perl -i -pe 's/-DLUA_COMPAT_(ALL|5_2)//' src/Makefile
76 make INSTALL_TOP="$LUA_HOME_DIR" install;
78 ln -s $LUA_HOME_DIR/bin/lua $HOME/.lua/lua
79 ln -s $LUA_HOME_DIR/bin/luac $HOME/.lua/luac;
87 LUAROCKS_BASE=luarocks-$LUAROCKS
89 curl --location http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | tar xz
93 if [ "$LUA" == "luajit" ]; then
94 ./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR";
95 elif [ "$LUA" == "luajit2.0" ]; then
96 ./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR";
97 elif [ "$LUA" == "luajit2.1" ]; then
98 ./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.1" --prefix="$LR_HOME_DIR";
100 ./configure --with-lua="$LUA_HOME_DIR" --prefix="$LR_HOME_DIR"
103 make build && make install
105 ln -s $LR_HOME_DIR/bin/luarocks $HOME/.lua/luarocks
111 rm -rf $LUAROCKS_BASE
113 if [ "$LUAJIT" == "yes" ]; then
115 elif [ "$LUA" == "lua5.1" ]; then
117 elif [ "$LUA" == "lua5.2" ]; then
119 elif [ "$LUA" == "lua5.3" ]; then