Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csbase-dev
sgarest-daemon
Commits
ab24002a
Commit
ab24002a
authored
Dec 23, 2020
by
Renato Figueiro Maia
Browse files
Ajuste para apagar arquivos baixados na instalação.
[SOMA-7020][SOMA-6957]
parent
d08972da
Changes
1
Hide whitespace changes
Inline
Side-by-side
install.sh
View file @
ab24002a
...
...
@@ -4,6 +4,7 @@ usage() {
echo
"usage:
$0
[options] path"
echo
"Available options are:"
echo
" --force Just show warnings, but don't stop execution."
echo
" --nocleanup Do not delete downloaded files on success."
echo
" --rocks <repoUrl> Use rocks from the provided LuaRocks repository."
echo
" --posix Install the POSIX driver."
echo
" --pbs Install the PBS driver (experimental)."
...
...
@@ -11,6 +12,7 @@ usage() {
}
WARNING
=
no
CLEANUP
=
yes
warn
()
{
echo
"
$0
:
$1
"
...
...
@@ -29,6 +31,20 @@ download() {
tar
-xzvf
"
$tarball
"
}
cleandownload
()
{
if
[[
${
CLEANUP
}
==
"yes"
&&
!
-z
"
$1
"
]]
then
if
[
-e
"
$1
.tar.gz"
]
then
rm
"
$1
.tar.gz"
fi
if
[
-d
"
$1
/"
]
then
rm
-fR
"
$1
/"
fi
fi
}
ROCK_REPO
=
"http://www.tecgraf.puc-rio.br/ftp_pub/csbase/sga-rest/luarocks"
SGA_HOME
=
""
SGA_DRIVERS
=
""
...
...
@@ -39,6 +55,10 @@ do
WARNING
=
yes
shift
;;
--nocleanup
)
CLEANUP
=
no
shift
;;
--rocks
)
shift
ROCK_REPO
=
"
$1
"
...
...
@@ -133,3 +153,5 @@ do
esac
done
cleandownload
"
${
LUA_VERSION
}
"
cleandownload
"
${
LUAROCKS_VERSION
}
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment