From a69a2cc1ffe4a0642a78468fe47b67e1c4fb2374 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Wed, 5 Feb 2020 21:47:57 +0100 Subject: Keep the list of html files to ignore up-to-date when building --- .gitignore | 13 ++++++++++++- Makefile | 1 + scripts/update-gitignore.sh | 14 ++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 scripts/update-gitignore.sh diff --git a/.gitignore b/.gitignore index 94c05db..56d73a5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,15 @@ build/ *.vo .*.aux *.glob -*.html~ \ No newline at end of file +*.html~ + +# begin generated files +site/posts/monad-transformers.html +site/posts/lisp-journey-getting-started.html +site/posts/extensible-type-safe-error-handling.html +site/posts/Ltac101.html +site/posts/RewritingInCoq.html +site/posts/StronglySpecifiedFunctionsProgram.html +site/posts/MiniHTTPServer.html +site/posts/StronglySpecifiedFunctions.html +# begin generated files diff --git a/Makefile b/Makefile index 7c52c0d..0f80d07 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ COQCARGS := -async-proofs-cache force build: ${POSTS} soupault + scripts/update-gitignore.sh ${POSTS} clean: rm -f ${POSTS} diff --git a/scripts/update-gitignore.sh b/scripts/update-gitignore.sh new file mode 100755 index 0000000..ea8a019 --- /dev/null +++ b/scripts/update-gitignore.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +BEGIN_MARKER="# begin generated files" +END_MARKER="# begin generated files" + +sed -i -e "/${BEGIN_MARKER}/,/${END_MARKER}/d" .gitignore +sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' .gitignore + +echo "" >> .gitignore +echo ${BEGIN_MARKER} >> .gitignore +for f in $@; do + echo "${f}" >> .gitignore +done +echo ${END_MARKER} >> .gitignore -- cgit v1.2.3