Added spacing to compile.sh
And made it exit out on compile error.
This commit is contained in:
		
							parent
							
								
									00c09584c7
								
							
						
					
					
						commit
						8e4836f83a
					
				| @ -3,20 +3,26 @@ cd "$(dirname "$0")" | |||||||
| 
 | 
 | ||||||
| test -e compiled || mkdir compiled | test -e compiled || mkdir compiled | ||||||
| 
 | 
 | ||||||
| if [[ $# -ne 0 ]] | if [[ $# -ne 0 ]]; then | ||||||
| then | 	for i in "$@";  | ||||||
|     for i in "$@";  | 	do | ||||||
|     do | 		smxfile="`echo $i | sed -e 's/\.sp$/\.smx/'`"; | ||||||
|         smxfile="`echo $i | sed -e 's/\.sp$/\.smx/'`"; | 		echo -e "Compiling $i..."; | ||||||
| 	    echo -n "Compiling $i..."; | 		./spcomp $i -ocompiled/$smxfile | ||||||
| 	    ./spcomp $i -ocompiled/$smxfile | 		RETVAL=$? | ||||||
|     done | 		if [ $RETVAL -ne 0 ]; then | ||||||
|  | 			exit 1; | ||||||
|  | 		fi | ||||||
|  | 	done | ||||||
| else | else | ||||||
| 
 | 	for sourcefile in *.sp | ||||||
| for sourcefile in *.sp | 	do | ||||||
| do | 		smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`" | ||||||
| 	smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`" | 		echo -e "Compiling $sourcefile ..." | ||||||
| 	echo -n "Compiling $sourcefile ..." | 		./spcomp $sourcefile -ocompiled/$smxfile | ||||||
| 	./spcomp $sourcefile -ocompiled/$smxfile | 		RETVAL=$? | ||||||
| done | 		if [ $RETVAL -ne 0 ]; then | ||||||
|  | 			exit 1; | ||||||
|  | 		fi | ||||||
|  | 	done | ||||||
| fi | fi | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user