22 lines
449 B
Fish
Executable file
22 lines
449 B
Fish
Executable file
#!/usr/bin/env fish
|
|
|
|
if test (count $argv) -lt 2
|
|
echo "$(status -f) [day] [part] ..."
|
|
exit 1
|
|
end
|
|
|
|
set input ""
|
|
if test $argv[1] = "--with-input"
|
|
set input "yes"
|
|
set -e argv[1]
|
|
end
|
|
|
|
set day $argv[1]
|
|
set part $argv[2]
|
|
|
|
if test -n $input
|
|
scala-cli run **.scala --main-class "aoc.day$day.Day$day" -- $part $argv[3..] < ./inputs/day$day.input
|
|
else
|
|
scala-cli run **.scala --main-class "aoc.day$day.Day$day" -- $part $argv[3..]
|
|
end
|