Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
hdoc
Commits
b67004bb
Commit
b67004bb
authored
Dec 14, 2015
by
lhommeni
Browse files
Modification du run.sh
parent
447b0e3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
wikipedia_to_hdoc/runURL.sh
0 → 100644
View file @
b67004bb
#!/bin/sh
lib
=
"lib"
ant
=
"ant/wiki_to_opale_fetcher.ant"
url
=
"-Dprogram.param=
$1
"
filename
=
"-Dprogram.param=
$2
"
#Recherche de java et controle que se soit une version SUN
vJavaCmd
=
"java"
xCheckJava
()
{
vInputVarName
=
\$
"
$1
"
vInputVarVal
=
`
eval
"expr
\"
$vInputVarName
\"
"
`
if
[
-z
"
$vInputVarVal
"
]
;
then
eval
"
$1
=false"
return
fi
vSunJavaFound
=
`
$vInputVarVal
-version
2>&1 |
grep
-Eo
-m
1
"(HotSpot)|(OpenJDK)"
`
if
[
"
$vSunJavaFound
"
!=
"HotSpot"
]
&&
[
"
$vSunJavaFound
"
!=
"OpenJDK"
]
;
then
eval
"
$1
=false"
return
fi
}
xCheckJava vJavaCmd
if
[
"
$vJavaCmd
"
=
"false"
]
;
then
vJavaCmd
=
"
$JAVA_HOME
/bin/java"
xCheckJava vJavaCmd
if
[
"
$vJavaCmd
"
=
"false"
]
;
then
echo
"ERREUR: JRE de SUN introuvable. Veuillez déclarer la variable d'environnement JAVA_HOME."
exit
1
fi
fi
#Lancer la commande
scJarList
=
"
$lib
/*"
$vJavaCmd
-classpath
"
$scJarList
:"
-Xmx150m
org.apache.tools.ant.Main
-buildfile
$ant
-DwikipediaUrl
$url
-Dfilename
$filename
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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