Allow filenames to be different
This commit is contained in:
parent
771c0e0256
commit
332ece0d97
10
c/bin/run
10
c/bin/run
@ -3,5 +3,13 @@
|
|||||||
year=$1
|
year=$1
|
||||||
day=$2
|
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)
|
time (cat ../data/$year/$day/input.txt | ./$year/$day/problem)
|
||||||
|
Loading…
Reference in New Issue
Block a user