Commit 31ec411a authored by Tyrannas's avatar Tyrannas

auto install modules when running batch and bash

parent 35716594
......@@ -53,7 +53,6 @@
<target name="insertion" if="wantToInsert">
<antcall target="installModules"/>
<exec executable="node" dir="./node">
<arg line="insert.js"/>
</exec>
......@@ -65,19 +64,4 @@
</condition>
</target>
<target name="checkModules">
<condition property="modNotInstalled">
<not>
<available file="node_modules" type="dir"/>
</not>
</condition>
</target>
<target name="installModules" depends="checkModules" if="modNotInstalled">
<echo>"modules non installés"</echo>
<exec executable="npm" dir=".">
<arg line="install"/>
</exec>
</target>
</project>
\ No newline at end of file
......@@ -2,7 +2,7 @@
set ant=hdoc_to_neo4j.ant
set antparam=-Dnode true;
IF NOT EXIST ./node_modules call npm install
ant -buildfile %ant% %antparam%
pause
......
......@@ -31,5 +31,9 @@ fi
#Lancer la commande
scJarList="$lib/*"
#test si les packages ont été installés
if [ ! -d "$node_modules" ]; then
npm install
fi
$vJavaCmd -classpath "$scJarList:" -Xmx150m org.apache.tools.ant.Main -buildfile $ant $antparam
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