16 lines
		
	
	
		
			295 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			295 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| year=$1
 | |
| day=$2
 | |
| 
 | |
| 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 &&
 | |
| time (cat ../data/$year/$day/input.txt | ./$year/$day/problem)
 |