Allow filenames to be different

This commit is contained in:
Bill Rossi 2024-11-30 16:07:30 -05:00
parent 771c0e0256
commit 332ece0d97
4 changed files with 9 additions and 1 deletions

View File

@ -3,5 +3,13 @@
year=$1
day=$2
gcc -o $year/$day/problem $year/$day/problem.c -lm
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)