works with error code
This commit is contained in:
		
							parent
							
								
									a647259dc2
								
							
						
					
					
						commit
						f69942533f
					
				
							
								
								
									
										13
									
								
								tam
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								tam
									
									
									
									
									
								
							@ -14,11 +14,14 @@ if [ -z "$1" ]
 | 
			
		||||
        file=$1
 | 
			
		||||
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
 | 
			
		||||
#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
 | 
			
		||||
 | 
			
		||||
printf "${GRN}Running file: $1.tam ...${NC}\n"
 | 
			
		||||
# Run the Program
 | 
			
		||||
if java -cp build/libs/Triangle-Tools.jar triangle.Compiler programs/$1.tri -o=$1.tam
 | 
			
		||||
    then 
 | 
			
		||||
        printf "${GRN}[INFO] Running file: $1.tam ...${NC}\n"
 | 
			
		||||
        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
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user