forked from jzrake/lunum
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·32 lines (24 loc) · 720 Bytes
/
setup
File metadata and controls
executable file
·32 lines (24 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
lua="lua-5.2.0"
luabin=$(pwd)/${lua}/bin
if [ $(uname) == "Darwin" ]; then
arch="macosx"
fi
if [ $(uname) == "Linux" ]; then
arch="linux"
fi
if [ ! -d ${lua} ]; then
echo "Downloading and installing Lua..."
wget http://www.lua.org/ftp/${lua}.tar.gz
tar xvf ${lua}.tar.gz
rm ${lua}.tar.gz
cd ${lua}; make $arch; make install INSTALL_TOP=$(pwd); cd ..;
fi
PATH=${PATH/${luabin}:/""} # Remove lua/bin from path if it exists
export PATH=${luabin}:$PATH
export LUA_CPATH=$(pwd)/src/?.so
export LUA_HOME=$(pwd)/${lua}
echo "*** run with 'source' to export these environment variables for build: ***"
echo "PATH=${PATH}"
echo "LUA_CPATH=${LUA_CPATH}"
echo "LUA_HOME=${LUA_HOME}"