AdventOfCode2024/run.sh
2024-12-01 14:53:37 -05:00

18 lines
267 B
Bash
Executable File

#!/bin/bash
__year=2024
__day="${1}"
if [ -z "${__day}" ]; then
__day=$(date '+%d')
fi
padded=$(printf "%02g" ${__day})
if [ -f "${padded}/index.ts" ]; then
cd $padded
npx tsx "index.ts" 2>/dev/null
cd - >/dev/null
else
echo "day not found"
fi