works with error code

java11
simonkellet 2 years ago
parent a647259dc2
commit f69942533f
  1. 15
      tam

15
tam

@ -14,11 +14,14 @@ if [ -z "$1" ]
file=$1 file=$1
fi fi
printf "${GRN}Compiling file: $1.tri to $1.tam ...${NC}\n" printf "${GRN}[INFO] Compiling file: $1.tri to $1.tam ...${NC}\n"
# Compile to tam # Compile to tam
#java -cp build/libs/Triangle-Tools.jar triangle.Compiler programs/$1.tri -o=$1.tam &> /dev/null #Quiet output, not handy! #java -cp build/libs/Triangle-Tools.jar triangle.Compiler programs/$1.tri -o=$1.tam &> /dev/null #Quiet output, not handy!
java -cp build/libs/Triangle-Tools.jar triangle.Compiler programs/$1.tri -o=$1.tam if java -cp build/libs/Triangle-Tools.jar triangle.Compiler programs/$1.tri -o=$1.tam
then
printf "${GRN}Running file: $1.tam ...${NC}\n" printf "${GRN}[INFO] Running file: $1.tam ...${NC}\n"
# Run the Program java -cp build/libs/Triangle-Tools.jar triangle.abstractMachine.Interpreter $1.tam
java -cp build/libs/Triangle-Tools.jar triangle.abstractMachine.Interpreter $1.tam else
printf "${RED}[ERROR] Could not complie $1.tri ...${NC}"
exit 1
fi