diff options
author | Thomas Voss <thomasvoss@live.com> | 2021-12-01 08:56:00 +0100 |
---|---|---|
committer | Thomas Voss <thomasvoss@live.com> | 2021-12-01 08:56:00 +0100 |
commit | 394df58d6da6928a6a3ebae31362342deca74b48 (patch) | |
tree | 9d9130761da691dbe923b5f1400bec69e087c223 /2021/01/Makefile | |
parent | 32fe21038a75a3f6da911c92247e422885cb521b (diff) |
Add a shell script solution
Diffstat (limited to '2021/01/Makefile')
-rw-r--r-- | 2021/01/Makefile | 10 |
1 files changed, 6 insertions, 4 deletions
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} |