From 394df58d6da6928a6a3ebae31362342deca74b48 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 1 Dec 2021 08:56:00 +0100 Subject: Add a shell script solution --- 2021/01/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to '2021/01/Makefile') diff --git a/2021/01/Makefile b/2021/01/Makefile index 9f0c9fb..d6b3c62 100644 --- a/2021/01/Makefile +++ b/2021/01/Makefile @@ -1,8 +1,10 @@ all: - sed '/# START PART 2/,/# END PART 2/d' puzzles.py >puzzle-1.py - sed '/# START PART 1/,/# END PART 1/d' puzzles.py >puzzle-2.py - chmod +x puzzle-[12].py + for ext in py sh; do \ + m4 -D DELTA=1 puzzles.$$ext >puzzle-1.$$ext; \ + m4 -D DELTA=3 puzzles.$$ext >puzzle-2.$$ext; \ + done + chmod +x puzzle-[12].{py,sh} .PHONY: clean clean: - rm -f puzzle-[12].py + rm -f puzzle-[12].{py,sh} -- cgit v1.2.3