]>
git.proxmox.com Git - ceph.git/blob - ceph/src/civetweb/ci/travis/setup_lua.sh
4 # this script installs a lua / luarocks environment in .travis/lua
5 # this is necessary because travis docker architecture (the fast way)
6 # does not permit sudo, and does not contain a useful lua installation
8 # After this script is finished, you can configure your environment to
9 # use it by sourcing lua_env.sh
11 source ci
/travis
/platform.sh
13 # The current versions when this script was written
15 LUAROCKS_VERSION
=2.2.2
17 # directory where this script is located
18 SCRIPT_DIR
=$
( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
21 PROJECT_DIR
=$
( cd "$( dirname "${BASH_SOURCE[0]}" )"/..
/..
&& pwd )
23 # fetch and unpack lua src
25 LUA_BASE
=lua-
$LUA_VERSION
27 curl http
://www.lua.org
/ftp
/$LUA_BASE.
tar.gz |
tar zx
34 # mv built lua install to target Lua dir
35 LUA_DIR
=$PROJECT_DIR/ci
/lua
37 mv $SCRIPT_DIR/$LUA_BASE/install $LUA_DIR
39 # add to path required by luarocks installer
40 export PATH
=$LUA_DIR/bin
:$PATH
43 # fetch and unpack luarocks
45 LUAROCKS_BASE
=luarocks-
$LUAROCKS_VERSION
46 rm -rf ${LUAROCKS_BASE}
47 LUAROCKS_URL
=http
://luarocks.org
/releases
/${LUAROCKS_BASE}.
tar.gz
48 # -L because it's a 302 redirect
49 curl
-L $LUAROCKS_URL |
tar xzp
53 .
/configure
--prefix=$LUA_DIR