1
0
Fork 0

verstr separated into script so that it may be used by others

master
Mike Gerwitz 2013-08-21 12:47:29 -04:00
parent 91c948340b
commit d720c6666d
2 changed files with 11 additions and 3 deletions

View File

@ -14,9 +14,7 @@ default: lvspec.pdf
# outputs a version string to uniquely identify the document revision # outputs a version string to uniquely identify the document revision
# TODO: use tag name if matches current commit # TODO: use tag name if matches current commit
verstr.tex: verstr.tex:
git log -n1 --format=%h | tr -d '\n' > verstr.tex verstr >$@
test -z "$$( git status -s | grep -v '^?? ' )" \
|| echo -n '-dirty' >> verstr.tex
clean: clean:
rm -f *.pdf rm -f *.pdf

10
verstr 100755
View File

@ -0,0 +1,10 @@
#!/bin/sh
#
# Generates version string
# output current shortref
git log -n1 --format=%h | tr -d '\n'
# if we have uncommitted changes, then append with -dirty
test -z "$$( git status -s | grep -v '^?? ' )" \
|| echo -n '-dirty'