Commit 31ec411a authored by Tyrannas's avatar Tyrannas
Browse files

auto install modules when running batch and bash

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