Files
2021-04-28 16:51:56 +10:00

34 lines
904 B
Bash
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash -e
BLUE='\E[1;34m'
CYAN='\E[1;36m'
YELLOW='\E[1;33m'
GREEN='\E[1;32m'
RESET='\E[0m'
echo -e "${BLUE} ${CYAN}Building Lua ${YELLOW}${LUA_VERSION}...${RESET}"
cd /tmp
wget "http://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz"
tar -xzf lua-${LUA_VERSION}.tar.gz
mv /tmp/lua-${LUA_VERSION} /tmp/lua
cd /tmp/lua
make linux test
# We have to install Lua for the Luarocks build to succeed, it will be installed again when building the final image
make install
echo -e "${BLUE} ${GREEN}Lua build completed${RESET}"
echo -e "${BLUE} ${CYAN}Building Luarocks ${YELLOW}${LUAROCKS_VERSION}...${RESET}"
cd /tmp
wget "http://luarocks.github.io/luarocks/releases/luarocks-${LUAROCKS_VERSION}.tar.gz"
tar -xzf luarocks-${LUAROCKS_VERSION}.tar.gz
mv /tmp/luarocks-${LUAROCKS_VERSION} /tmp/luarocks
cd /tmp/luarocks
./configure
make
echo -e "${BLUE} ${GREEN}Luarocks build completed${RESET}"