15 lines
409 B
Nim
15 lines
409 B
Nim
import std/[algorithm, os, strformat, sequtils]
|
|
|
|
--noNimblePath
|
|
--path:"./src"
|
|
|
|
task solve, "run all solutions":
|
|
for dir in walkDirRec("solutions", yieldFilter = {pcDir}).toSeq().sortedByIt(it):
|
|
echo "--",dir,"--"
|
|
var cmd = "r --hint:all:off "
|
|
when defined(noSolve): cmd &= "-d:noSolve"
|
|
cmd &= fmt" {dir}/solution.nim "
|
|
selfExec cmd
|
|
|
|
task new, "generate new day":
|
|
exec "nim r src/aoc"
|