Skip to content

Commit

Permalink
Switched to @moteus latest config
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonaba committed Jan 3, 2016
1 parent 842fb58 commit 902c841
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -8,9 +8,9 @@ env:
matrix:
- LUA=lua5.1
- LUA=lua5.2
- LUA=luajit # latest stable version (2.0.4)
- LUA=luajit # latest stable version (2.0.3)
- LUA=luajit2.0 # current head of 2.0 branch
#- LUA=luajit2.1 # current head of 2.1 branc
- LUA=luajit2.1 # current head of 2.1 branch

before_install:
- source .travis/setenv_lua.sh
Expand Down
24 changes: 11 additions & 13 deletions .travis/setup_lua.sh
Expand Up @@ -8,7 +8,8 @@

set -eufo pipefail

LUAJIT_BASE="LuaJIT-2.0.4"
LUAJIT_VERSION="2.0.4"
LUAJIT_BASE="LuaJIT-$LUAJIT_VERSION"

source .travis/platform.sh

Expand Down Expand Up @@ -39,26 +40,23 @@ mkdir -p "$LUA_HOME_DIR"
if [ "$LUAJIT" == "yes" ]; then

if [ "$LUA" == "luajit" ]; then
curl http://luajit.org/download/$LUAJIT_BASE.tar.gz | tar xz;
curl --location https://github.com/LuaJIT/LuaJIT/archive/v$LUAJIT_VERSION.tar.gz | tar xz;
else
git clone http://luajit.org/git/luajit-2.0.git $LUAJIT_BASE;
git clone https://github.com/LuaJIT/LuaJIT.git $LUAJIT_BASE;
fi

cd $LUAJIT_BASE

if [ "$LUA" == "luajit2.1" ]; then
git checkout v2.1;
# force the INSTALL_TNAME to be luajit
perl -i -pe 's/INSTALL_TNAME=.+/INSTALL_TNAME= luajit/' Makefile
fi

make && make install PREFIX="$LUA_HOME_DIR"

if [ "$LUA" == "luajit2.1" ]; then
ln -s $LUA_HOME_DIR/bin/luajit-2.1.0-alpha $HOME/.lua/luajit
ln -s $LUA_HOME_DIR/bin/luajit-2.1.0-alpha $HOME/.lua/lua;
else
ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/luajit
ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/lua;
fi;
ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/luajit
ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/lua;

else

Expand All @@ -69,8 +67,8 @@ else
curl http://www.lua.org/ftp/lua-5.2.4.tar.gz | tar xz
cd lua-5.2.4;
elif [ "$LUA" == "lua5.3" ]; then
curl http://www.lua.org/ftp/lua-5.3.1.tar.gz | tar xz
cd lua-5.3.1;
curl http://www.lua.org/ftp/lua-5.3.2.tar.gz | tar xz
cd lua-5.3.2;
fi

# Build Lua without backwards compatibility for testing
Expand Down Expand Up @@ -120,5 +118,5 @@ elif [ "$LUA" == "lua5.1" ]; then
elif [ "$LUA" == "lua5.2" ]; then
rm -rf lua-5.2.4;
elif [ "$LUA" == "lua5.3" ]; then
rm -rf lua-5.3.1;
rm -rf lua-5.3.2;
fi

0 comments on commit 902c841

Please sign in to comment.