From 9ec372f2ceee87ab452abe96f179e699c6123443 Mon Sep 17 00:00:00 2001 From: Jan Vales Date: Tue, 3 Sep 2013 15:18:28 +0200 Subject: [PATCH] added hook to get gitinfo stuff --- gitinfohook.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 gitinfohook.sh diff --git a/gitinfohook.sh b/gitinfohook.sh new file mode 100755 index 0000000..e085f4e --- /dev/null +++ b/gitinfohook.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# Copyright 2011 Brent Longborough +# Please read gitinfo.pdf for licencing and other details +# ----------------------------------------------------- +# cp gitinfohook.sh .git/hooks/post-update +# chmod +x .git/hooks/post-update +# +#prefixes=". test docs" # Example for multiple gitHeadInfo.tex files +prefixes="." # Default --- in the working copy root +for pref in $prefixes + do + git log -1 --date=short \ + --pretty=format:"\usepackage[% + shash={%h}, + lhash={%H}, + authname={%an}, + authemail={%ae}, + authsdate={%ad}, + authidate={%ai}, + authudate={%at}, + commname={%an}, + commemail={%ae}, + commsdate={%ad}, + commidate={%ai}, + commudate={%at}, + refnames={%d} + ]{gitsetinfo}" HEAD > $pref/gitHeadInfo.gin + done -- 2.43.0