Browse Source

Added verification that compile succeeds in ntalkc.

Göran Krampe 13 years ago
parent
commit
068e6d8a0f
1 changed files with 10 additions and 0 deletions
  1. 10 0
      nodejs/ntalkc

+ 10 - 0
nodejs/ntalkc

@@ -79,6 +79,16 @@ cat $JTALK/js/boot.js $JTALK/js/Kernel.js $JTALK/js/Parser.js $JTALK/js/Compiler
 # Compile all collected .st files to .js
 node $TMPDIR/compiler-all.js $COMPILE
 
+# Verify all .js files corresponding .st files were created, otherwise exit
+IFS=" "
+for FILE in $COMPILED
+do
+  if [ ! -f "$FILE" ]; then
+    echo "Failed compilation of $FILE, exiting."
+    exit 1
+  fi 
+done
+
 # Compose the complete libs.js file from collected .js filenames.
 if [ -n "$LIBS" ]; then
   echo "LIBS $LIBS"