diff options
author | mhsn <mail@mhsn.net> | 2025-09-12 21:06:59 +0100 |
---|---|---|
committer | mhsn <mail@mhsn.net> | 2025-09-12 21:07:11 +0100 |
commit | ff88fb5d1b7f3dc52858f89c27f3646b493d4828 (patch) | |
tree | c7e11cab8ebdb332c756b4480d99906ab9d82f2d /check | |
parent | 47d87fb5b6c14acb4918540580702d49ddfdd037 (diff) | |
download | aoc-ff88fb5d1b7f3dc52858f89c27f3646b493d4828.tar.gz aoc-ff88fb5d1b7f3dc52858f89c27f3646b493d4828.zip |
remove double quote madness from check
Diffstat (limited to 'check')
-rwxr-xr-x | check | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -8,26 +8,26 @@ input=${4?$usage} bench=$5 # get directory of this script -script=$(readlink -f "$0") -script_path=$(dirname "$script") +script=$(readlink -f $0) +script_path=$(dirname $script) # find aoc and data paths aoc_path=$script_path/$year/$day -data_path="$aoc_path/data/$input.txt" +data_path=$aoc_path/data/$input.txt case $lang in -"python") - solve="$aoc_path/python.py" +python) + solve=$aoc_path/python.py ;; -"rust") +rust) cargo build --target-dir /tmp/aoc_rust --manifest-path $aoc_path/rust/Cargo.toml - solve="/tmp/aoc_rust/debug/aoc_$year-$day" + solve=/tmp/aoc_rust/debug/aoc_$year-$day ;; -"rustc") +rustc) cargo build --release --target-dir /tmp/aoc_rust --manifest-path $aoc_path/rust/Cargo.toml - solve="/tmp/aoc_rust/release/aoc_$year-$day" + solve=/tmp/aoc_rust/release/aoc_$year-$day ;; -"*") +*) echo "unknown lang: $lang" exit 1 ;; @@ -39,7 +39,7 @@ code=$? [ $code -eq 0 ] && echo Solved with $lang! || echo "$diff" -[ -n "$bench" ] && hyperfine --shell none --input $data_path "$solve" && exit 0 +[ -n "$bench" ] && hyperfine --shell none --input $data_path $solve && exit 0 echo "\n---stdout---" echo "$result" |