Skip to content

Commit 615926d

Browse files
committed
Miscellaneous tooling fixes
1 parent 4afb967 commit 615926d

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.lvimrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ let &path = lh#path#munge(&path, lh#path#fix(g:localvimrc_script_dir . '/aoc_lib
33

44
if &filetype ==# 'cpp'
55
let b:surround_{char2nr('D')} = "if constexpr (aoc::DEBUG) {\n\r\n}"
6+
setlocal shiftwidth=4
67
endif

tools/cpp/check_times.zsh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env zsh
2-
set -eu
32
# benchmark all days and output a summary
43

54
make -q fast || make -j24 fast

tools/cpp/workon

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ if ! [[ -e input/day$day/input.txt ]]; then
1313
fi
1414

1515
declare -a to_edit
16-
if ! [[ -e input/day$day/example1.txt ]]; then
17-
to_edit+=("input/day$day/example1.txt")
16+
example_input="input/day$day/example1.txt"
17+
if ! [[ -e $example_input ]]; then
18+
to_edit+=("$example_input")
1819
fi
1920
mkdir -p "answer_tests/day$day"
2021
example_answers="answer_tests/day$day/example1.txt"
21-
if ! [[ -e "$example_answers" ]] || [[ $(wc -l "$example_answers" | cut -d' ' -f1) -lt 2 ]]; then
22+
if ! [[ -e $example_input ]] \
23+
|| ! [[ -e $example_answers ]] \
24+
|| [[ $(wc -l "$example_answers" | cut -d' ' -f1) -lt 2 ]]; then
2225
if ! [[ -e "$example_answers" ]]; then
2326
echo "Day ${day#0}:" > "$example_answers"
2427
fi

0 commit comments

Comments
 (0)