test.sh: make shellcheck happy
This commit is contained in:
parent
bb0fbc0f8f
commit
0ce9b79c20
1 changed files with 6 additions and 3 deletions
9
test.sh
9
test.sh
|
@ -11,12 +11,12 @@ OUTDIR=$(mktemp --directory)
|
|||
trap "rm -rf '$OUTDIR'" EXIT
|
||||
|
||||
run_solution() {
|
||||
if [ -d "$solution" ]; then
|
||||
if [ -f "$solution/Cargo.toml" ]; then
|
||||
if [[ -d "$solution" ]]; then
|
||||
if [[ -f "$solution/Cargo.toml" ]]; then
|
||||
cargo run --quiet --manifest-path "$solution/Cargo.toml" < "$input"
|
||||
else
|
||||
runfile=$solution/run.sh
|
||||
[ -f "$runfile" ] || { echo "Error: $runfile not found" >&2; exit 1; }
|
||||
[[ -f "$runfile" ]] || { echo "Error: $runfile not found" >&2; exit 1; }
|
||||
"$runfile" "$input"
|
||||
fi
|
||||
else
|
||||
|
@ -49,6 +49,9 @@ do_day() {
|
|||
example*)
|
||||
echo SKIP
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
solution_output=$OUTDIR/${year}_$day.out
|
||||
|
|
Loading…
Reference in a new issue