aoc2023/scripts/get-input

11 lines
280 B
Racket
Executable File

#!/usr/bin/env racket
#lang racket
(require "aoc-lib.rkt")
(command-line
#:program "get-input"
#:args (day)
(define in (aoc-fetch-input (getenv "AOC_YEAR") day (getenv "AOC_SESSION")))
(call-with-output-file (build-path "inputs" day) (lambda (out) (copy-port in out))))