From 518a09b00f5696ba0aa3639decbe87b3005fe9a4 Mon Sep 17 00:00:00 2001 From: julian Date: Sat, 16 Mar 2024 17:14:51 +0100 Subject: [PATCH] update compile.sh --- compile.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/compile.sh b/compile.sh index 1fe9a93e..27973653 100755 --- a/compile.sh +++ b/compile.sh @@ -3,10 +3,10 @@ SRCDIR="javatx-src/main/java" DESTDIR="out" JAVAC_FLAGS="-g:none -nowarn" -JAVATX_COMPILER_PATH="JavaTXcompiler-1.1-jar-with-dependencies.jar" +JAVATX_COMPILER_PATH="JavaTXcompiler-1.2-jar-with-dependencies.jar" #remove all files, if the script is called with parameter "clear" -if [ "$1" = "clear" ]; then +if [ "$1" = "clean" ]; then rm -r "$DESTDIR" exit 0 fi @@ -54,11 +54,15 @@ done if [ "${#JAV_CHANGED[@]}" -ne 0 ]; then for ((i = 0; i < "${#JAV_CHANGED[@]}"; i++)); do java -jar $JAVATX_COMPILER_PATH -d "${JAV_CLASSES[i]%/*}" -cp "$SRCDIR:$DESTDIR:target/dependencies/" "${JAV_CHANGED[i]}" + if [ $? -eq 1 ]; then + exit 1; + fi done fi if [ "${#JAVA_CHANGED[@]}" -ne 0 ]; then - javac -d $DESTDIR -cp "$SRCDIR:$DESTDIR:target/dependencies/*" $JFLAGS "${JAVA_CHANGED[@]}" + echo "javac -d $DESTDIR -cp "$SRCDIR:$DESTDIR:target/dependencies/*" $JAVAC_FLAGS ${JAVA_CHANGED[@]}" + javac -d $DESTDIR -cp "$SRCDIR:$DESTDIR:target/dependencies/*" $JAVAC_FLAGS "${JAVA_CHANGED[@]}" fi