parent
							
								
									d69c3ceb73
								
							
						
					
					
						commit
						1f013dc0c3
					
				
					 4 changed files with 6 additions and 19 deletions
				
			
		
							
								
								
									
										12
									
								
								prepare
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								prepare
									
										
									
									
									
								
							|  | @ -4,15 +4,11 @@ part="$2" | |||
| 
 | ||||
| day="$(printf '%02d' "$day")" | ||||
| 
 | ||||
| name="Day${day}/Part${part}" | ||||
| 
 | ||||
| if zig -h > /dev/null && test -f "${name}.zig"; then | ||||
| 	zig build-exe --name run "${name}.zig" | ||||
| elif luac -v > /dev/null && test -f "${name}.lua"; then | ||||
| 	luac -o luac.out "${name}.lua" | ||||
| if test -f "Day${day}/Part${part}.lua"; then | ||||
| 	luac -o luac.out "Day${day}/Part${part}.lua" | ||||
| 	printf '#!/bin/sh\nlua luac.out "$@"\n' > run | ||||
| 	chmod u+x run | ||||
| elif stack > /dev/null && test -f "${name}.hs"; then | ||||
| elif test -f "Day${day}/Part${part}.hs"; then | ||||
| 	#stack build | ||||
| 	stack ghc -- -O3 "${name}.hs" -o run | ||||
| 	stack ghc -- -O3 "Day${day}/Part${part}.hs" -o run | ||||
| fi | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Felix Van der Jeugt
						Felix Van der Jeugt