Source

syntactic / bin / convert.sh

Diff from to

File bin/convert.sh

 cd $(dirname $0)
 cd ..
 
+export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/"
+
 CP="parser/output/ant/classes/parser:convert/output/ant/classes/main"
 for JAR in lib/core/*.jar
 do
     CP="${CP}:${JAR}"
 done
 
+for JAR in lib/samples/*.jar
+do
+    if [ -z "${CP2}" ]
+    then
+        CP2="${JAR}"
+    else
+        CP2="${CP2}:${JAR}"
+    fi
+done
+
 MAIN="org.adjective.syntactic.convert.j8to7.Main"
 
 OUTPUT="output/convert"
 
 for FILE in "$@"
 do
-    java -cp "${CP}" "${MAIN}" --source "${FILE}" --output "${OUTPUT}"
+    java -cp "${CP}" "${MAIN}" --source "${FILE}" --output "${OUTPUT}" --classpath "${CP2}"
     if [ -f ${FILE} ]
     then
         show "${OUTPUT}/$( basename ${FILE} )"