···17[no-cd]
18do part input:
19 #!/usr/bin/env fish
20- if test -f {{part}}.hs
0000021 ghc {{part}} -O -outputdir.{{part}} > /dev/null
22 and time ./{{part}} < {{input}}
23 else if ls | rg "\.cabal\$" -q
24 cabal build {{part}} > /dev/null
25 and time cabal run {{part}} < {{input}}
26- else if test -f {{part}}.fish
27- time ./{{part}}.fish < {{input}}
28 else
29 echo "Current directory does not contain known solution configuration"
30 exit 1
···17[no-cd]
18do part input:
19 #!/usr/bin/env fish
20+ set fn (fd -d 1 -t f {{part}})
21+ if test -n "$fn" -a -x "$fn"
22+ time ./$fn < {{input}}
23+ else if test -f {{part}}.pl
24+ and time swipl -s "$fn" -g main,halt < {{input}}
25+ else if test -f {{part}}.hs
26 ghc {{part}} -O -outputdir.{{part}} > /dev/null
27 and time ./{{part}} < {{input}}
28 else if ls | rg "\.cabal\$" -q
29 cabal build {{part}} > /dev/null
30 and time cabal run {{part}} < {{input}}
0031 else
32 echo "Current directory does not contain known solution configuration"
33 exit 1