mirror of
https://github.com/Threnklyn/advent-of-code-go.git
synced 2026-05-18 19:13:27 +02:00
update makefile scripts to run with only DAY set
This commit is contained in:
@@ -13,6 +13,10 @@ skeleton: ## make skeleton main(_test).go files, optional: $DAY and $YEAR
|
||||
@ if [[ -n $$DAY && -n $$YEAR ]]; then \
|
||||
go run scripts/cmd/skeleton/main.go -day $(DAY) -year $(YEAR); \
|
||||
fi
|
||||
# DAY only, use current year
|
||||
@ if [[ -n $$DAY ]]; then \
|
||||
go run scripts/cmd/skeleton/main.go -day $(DAY); \
|
||||
fi
|
||||
# if DAY or YEAR are not set, allow the go binary to default to today
|
||||
@ if [[ -z $$DAY || -z $$YEAR ]]; then \
|
||||
go run scripts/cmd/skeleton/main.go; \
|
||||
@@ -23,6 +27,10 @@ input: check-aoc-cookie ## get input, requires $AOC_SESSION_COOKIE, optional: $D
|
||||
@ if [[ -n $$DAY && -n $$YEAR ]]; then \
|
||||
go run scripts/cmd/input/main.go -day $(DAY) -year $(YEAR) -cookie $(AOC_SESSION_COOKIE); \
|
||||
fi
|
||||
# DAY only, use current year
|
||||
@ if [[ -n $$DAY ]]; then \
|
||||
go run scripts/cmd/input/main.go -day $(DAY) -cookie $(AOC_SESSION_COOKIE); \
|
||||
fi
|
||||
# if DAY or YEAR are not yet, allow the go binary to default to today
|
||||
@ if [[ -z $$DAY || -z $$YEAR ]]; then \
|
||||
go run scripts/cmd/input/main.go -cookie $(AOC_SESSION_COOKIE); \
|
||||
@@ -33,6 +41,10 @@ prompt: check-aoc-cookie ## get prompt, requires $AOC_SESSION_COOKIE, optional:
|
||||
@ if [[ -n $$DAY && -n $$YEAR ]]; then \
|
||||
go run scripts/cmd/prompt/main.go -day $(DAY) -year $(YEAR) -cookie $(AOC_SESSION_COOKIE); \
|
||||
fi
|
||||
# DAY only, use current year
|
||||
@ if [[ -n $$DAY ]]; then \
|
||||
go run scripts/cmd/prompt/main.go -day $(DAY) -year $(YEAR) -cookie $(AOC_SESSION_COOKIE); \
|
||||
fi
|
||||
# if DAY or YEAR are not yet, allow the go binary to default to today
|
||||
@ if [[ -z $$DAY || -z $$YEAR ]]; then \
|
||||
go run scripts/cmd/prompt/main.go -cookie $(AOC_SESSION_COOKIE); \
|
||||
|
||||
Reference in New Issue
Block a user