summaryrefslogtreecommitdiffhomepage
path: root/include/footer.html
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-07-31 09:34:25 +0200
committerThomas Voss <mail@thomasvoss.com> 2023-07-31 09:34:25 +0200
commit87dc34ab660fe91d3e77bde7548a9c6d05d28f03 (patch)
tree87b69092c57f7a38652be0842a48ec7f3da90130 /include/footer.html
parent8aac2072a561d3cdcf2a0fed4b49ed38de7de450 (diff)
Don’t print an error if there is no commit yet
When working on a new file, I like to auto-compile my changes with: $ git ls-files | entr make But since footer generation fails due to no commit existing, date(1) screams at me. This should fix that issue.
Diffstat (limited to 'include/footer.html')
-rw-r--r--include/footer.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/footer.html b/include/footer.html
index 9557e17..e3235e1 100644
--- a/include/footer.html
+++ b/include/footer.html
@@ -7,7 +7,8 @@ m4_define(`m4___id__', m4_esyscmd(git rev-list -1 HEAD m4___caller__))
>
m4_esyscmd(
git log -1 --pretty='format:%cI' m4___caller__ \
- | xargs date +'%A %d %B %Y — %T %Z' -d
+ | ifne xargs date +'%A %d %B %Y — %T %Z' -d \
+ | ifne -n echo 'No commit yet…'
)
</a>
</small>