From be494d8bfdb79ffb026cdd3179d68c29949e22b2 Mon Sep 17 00:00:00 2001 From: haskal Date: Mon, 14 Dec 2020 19:55:55 -0500 Subject: [PATCH] update scripts --- scripts/countdown | 10 +++++++--- scripts/make-day | 5 +---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/countdown b/scripts/countdown index 30af200..fa320da 100755 --- a/scripts/countdown +++ b/scripts/countdown @@ -7,12 +7,11 @@ export TZ="America/New_York" function init_day { day=$(($(date +%-d))) - if [ ! -f $day.rkt ]; then + if [ ! -f inputs/$day ]; then set -m scripts/get-challenge $day & sleep 1 - scripts/make-day $day - tmux split-pane -v -- "bash -li <<< 'watch $day; execstring template) (hash 'day day) out))) - ;; get input - (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)))) + (eval-template (path->string template) (hash 'day day) out))))