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
Stephane Crozat
hdoc
Commits
31ec411a
Commit
31ec411a
authored
Dec 21, 2016
by
Tyrannas
Browse files
auto install modules when running batch and bash
parent
35716594
Changes
3
Hide whitespace changes
Inline
Side-by-side
hdoc_to_neo4j/hdoc_to_neo4j.ant
View file @
31ec411a
...
@@ -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"
>
<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>
</project>
\ No newline at end of file
hdoc_to_neo4j/runWithNode.bat
View file @
31ec411a
...
@@ -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
...
...
hdoc_to_neo4j/runWithNode.sh
View file @
31ec411a
...
@@ -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
fi
$vJavaCmd
-classpath
"
$scJarList
:"
-Xmx150m
org.apache.tools.ant.Main
-buildfile
$ant
$antparam
$vJavaCmd
-classpath
"
$scJarList
:"
-Xmx150m
org.apache.tools.ant.Main
-buildfile
$ant
$antparam
Write
Preview
Supports
Markdown
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