From 728784649f837b130ee88ccb88e319f1103640aa Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Mon, 19 Oct 2015 07:35:12 +0000 Subject: [PATCH] 'make install': Install .version and .revision-hash. --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5088d6a..7eaae66 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,12 @@ all: install: $(INSTALL) -d $(SHARE_DIR) - cp -r zsh-syntax-highlighting.zsh highlighters $(SHARE_DIR) + cp -r .version zsh-syntax-highlighting.zsh highlighters $(SHARE_DIR) + if [ x"true" = x"`git rev-parse --is-inside-work-tree 2>/dev/null`" ]; then \ + git rev-parse HEAD; \ + else \ + cat .revision-hash; \ + fi > $(SHARE_DIR)/.revision-hash test: @result=0