| 1 |
#!/bin/sh |
| 2 |
# Copyright 2011 Brent Longborough |
| 3 |
# Please read gitinfo.pdf for licencing and other details |
| 4 |
# ----------------------------------------------------- |
| 5 |
# Post-{commit,checkout,merge} hook for the gitinfo package |
| 6 |
# |
| 7 |
prefixes=". test docs" # Example for multiple gitHeadInfo.tex files |
| 8 |
prefixes="." # Default --- in the working copy root |
| 9 |
for pref in $prefixes |
| 10 |
do |
| 11 |
git log -1 --date=short \ |
| 12 |
--pretty=format:"\usepackage[% |
| 13 |
shash={%h}, |
| 14 |
lhash={%H}, |
| 15 |
authname={%an}, |
| 16 |
authemail={%ae}, |
| 17 |
authsdate={%ad}, |
| 18 |
authidate={%ai}, |
| 19 |
authudate={%at}, |
| 20 |
commname={%an}, |
| 21 |
commemail={%ae}, |
| 22 |
commsdate={%ad}, |
| 23 |
commidate={%ai}, |
| 24 |
commudate={%at}, |
| 25 |
refnames={%d} |
| 26 |
]{gitsetinfo}" HEAD > $pref/gitHeadInfo.gin |
| 27 |
done |