Commit e6b54b2c authored by Renato Figueiro Maia's avatar Renato Figueiro Maia
Browse files

Permitir passar argumentos para o LuaRocks na instalação

[SOMA-7224][SOMA-7223]
parent 43ce6391
Pipeline #70508 passed with stages
in 6 minutes and 19 seconds
......@@ -48,6 +48,7 @@ cleandownload() {
ROCK_REPO="http://www.tecgraf.puc-rio.br/ftp_pub/csbase/sga-rest/luarocks"
SGA_HOME=""
SGA_DRIVERS=""
LUAROCK_ARG=""
while [ $# -gt 0 ]
do
case "$1" in
......@@ -64,6 +65,11 @@ do
ROCK_REPO="$1"
shift
;;
--rockarg)
shift
LUAROCK_ARG="${LUAROCK_ARG} $1"
shift
;;
--posix|--pbs|--slurm)
SGA_DRIVERS="${SGA_DRIVERS} ${1##--}"
shift
......@@ -111,7 +117,8 @@ then
fi
ROCK_REPO_CFG="rocks_servers = { '${ROCK_REPO}' }"
if [[ ! -x ${SGA_HOME}/bin/luarocks ]]
LUAROCK_BIN="${SGA_HOME}/bin/luarocks ${LUAROCK_ARG}"
if [[ ! -x ${LUAROCK_BIN} ]]
then
LUAROCKS_VERSION="luarocks-2.4.2"
download https://luarocks.github.io/luarocks/releases ${LUAROCKS_VERSION}
......@@ -128,27 +135,27 @@ fi
case "$(uname -s)" in
CYGWIN*)
${SGA_HOME}/bin/luarocks install lub
${SGA_HOME}/bin/luarocks install xml CC=g++ LD=g++
${SGA_HOME}/bin/luarocks install luaposix LDFLAGS=-no-undefined
${LUAROCK_BIN} install lub
${LUAROCK_BIN} install xml CC=g++ LD=g++
${LUAROCK_BIN} install luaposix LDFLAGS=-no-undefined
;;
esac
${SGA_HOME}/bin/luarocks make sga-daemon-*.rockspec
${LUAROCK_BIN} make sga-daemon-*.rockspec
for driver in ${SGA_DRIVERS}
do
case ${driver} in
posix)
${SGA_HOME}/bin/luarocks make sga-driver-posix-*.rockspec
${LUAROCK_BIN} make sga-driver-posix-*.rockspec
;;
pbs)
${SGA_HOME}/bin/luarocks make sga-exec-*.rockspec
${SGA_HOME}/bin/luarocks make sga-driver-pbs-*.rockspec
${LUAROCK_BIN} make sga-exec-*.rockspec
${LUAROCK_BIN} make sga-driver-pbs-*.rockspec
;;
slurm)
${SGA_HOME}/bin/luarocks make sga-exec-*.rockspec
${SGA_HOME}/bin/luarocks make sga-driver-slurm-*.rockspec
${LUAROCK_BIN} make sga-exec-*.rockspec
${LUAROCK_BIN} make sga-driver-slurm-*.rockspec
;;
esac
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment