[XeTeX] How to get and use the git revision number?

Sharon Kimble boudiccas at skimble.plus.com
Thu Sep 25 19:50:12 CEST 2014


I use the following script to build my project pdf using xelatex

--8<---------------cut here---------------start------------->8---
#!/bin/bash
set -e
#set -x

#variables

cd ~/research/foo/; filename="000uh2014"   # foo
# cd ~/research/foo1/de; filename="obde2014"   # foo1
# cd ~/research/foo2/; filename="000beeb2014"    # foo2
# cd ~/research/foo3/; filename="ob2014"   # foo3

#############
xelatex $filename
biber $filename
xelatex $filename 
biber $filename
xelatex $filename 
makeindex $filename
biber $filename
makeindex $filename
xelatex $filename
makeglossaries $filename
xelatex $filename
xelatex $filename

exit 0;
--8<---------------cut here---------------end--------------->8---

This works very well, and I can choose which project to work with and
just uncomment it and comment out the previous choice.

But now I want to have the git revision number in the title page, and
have that change after every git commit. But how do I do it please?

Thanks
Sharon. 
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.5, emacs 24.3.93.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20140925/c5044ed2/attachment.bin>


More information about the XeTeX mailing list