| 
									
										
										
										
											2023-12-19 14:42:49 -05:00
										 |  |  | #!/usr/bin/env bash | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | year=$1 | 
					
						
							|  |  |  | day=$2 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-30 16:07:30 -05:00
										 |  |  | mkdir -p $year/$day | 
					
						
							|  |  |  | source_file=$(ls $year/$day/*.c) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [[ -z $source_file ]] ; then | 
					
						
							|  |  |  |     echo "No c source file found in $year/$day" | 
					
						
							|  |  |  |     exit 1 | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | gcc -o $year/$day/problem $source_file -lm && | 
					
						
							| 
									
										
										
										
											2024-11-19 20:04:10 -05:00
										 |  |  | time (cat ../data/$year/$day/input.txt | ./$year/$day/problem) |