Git revision info comes now out of a tex file.
The variant developed on a Windows system didn't work on a Archlinux system. Now the Makefile creates a file 'revision.tex' which the main latex file inputs as revision number. Hopefully this will do the trick on both systems.
This commit is contained in:
parent
eddf87720f
commit
d537fd498e
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
|||||||
*.*~
|
*.*~
|
||||||
out/*
|
out/*
|
||||||
pdf/*
|
pdf/*
|
||||||
|
revision.tex
|
||||||
|
8
Makefile
8
Makefile
@ -14,7 +14,7 @@ VPATH = \
|
|||||||
|
|
||||||
all: book
|
all: book
|
||||||
|
|
||||||
book: $(OUTDIR) $(PDFDIR)
|
book: $(OUTDIR) $(PDFDIR) revision.tex
|
||||||
cp headfoot.tex $(OUTDIR)/
|
cp headfoot.tex $(OUTDIR)/
|
||||||
cp settings.tex $(OUTDIR)/
|
cp settings.tex $(OUTDIR)/
|
||||||
cp -r license/ $(OUTDIR)/
|
cp -r license/ $(OUTDIR)/
|
||||||
@ -30,6 +30,10 @@ $(OUTDIR):
|
|||||||
|
|
||||||
$(PDFDIR):
|
$(PDFDIR):
|
||||||
mkdir -p $(PDFDIR)
|
mkdir -p $(PDFDIR)
|
||||||
|
|
||||||
|
revision.tex:
|
||||||
|
echo "% Autogenerated, do not edit" > revision.tex
|
||||||
|
echo "\\newcommand{\\revision}{`git log -1 --format=\"%h\"`}" >> revision.tex
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(OUTDIR)
|
rm -rf $(OUTDIR)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<<
|
<<
|
||||||
\chords {s4 g2 e1*3/4:m g2 c1*3/4:7 a2:m d1*3/4:7 g2 c1*3/4:7 a2:m d1*3/4:7 e4:m a2:m g e4:m a2:m g}
|
\chords {s4 g2 e1*3/4:m g2 c1*3/4:7 a2:m d1*3/4:7 g2 c1*3/4:7 a2:m d1*3/4:7 e4:m a2:m g e4:m a2:m g}
|
||||||
\relative d''
|
\relative d'
|
||||||
{
|
{
|
||||||
\time 5/4
|
\time 5/4
|
||||||
\key g \major
|
\key g \major
|
||||||
|
@ -7,8 +7,9 @@
|
|||||||
\usepackage{xmpincl}
|
\usepackage{xmpincl}
|
||||||
\usepackage{hyperref}
|
\usepackage{hyperref}
|
||||||
|
|
||||||
\input{settings.tex}
|
\input{settings}
|
||||||
\input{headfoot.tex}
|
\input{headfoot}
|
||||||
|
\input{revision}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\widowpenalties 1 10000
|
\widowpenalties 1 10000
|
||||||
|
@ -16,12 +16,11 @@
|
|||||||
\end{minipage}
|
\end{minipage}
|
||||||
\begin{minipage}{0.4\textwidth}
|
\begin{minipage}{0.4\textwidth}
|
||||||
\begin{flushright} \large
|
\begin{flushright} \large
|
||||||
\emph{Git Revision:} \\
|
\emph{Git Revision:} \\
|
||||||
\input{|"git log -1 --oneline --no-notes | cut -d ' ' -f1"}
|
\revision \\
|
||||||
\end{flushright}
|
\end{flushright}
|
||||||
\end{minipage}
|
\end{minipage}
|
||||||
\vfill
|
\vfill
|
||||||
|
|
||||||
\textbf{Creative Commons BY-SA 3.0 Unported License}
|
\textbf{Creative Commons BY-SA 3.0 Unported License}
|
||||||
\url{http://creativecommons.org/licenses/by-sa/3.0} \\
|
\url{http://creativecommons.org/licenses/by-sa/3.0} \\
|
||||||
~\\
|
~\\
|
||||||
|
Loading…
Reference in New Issue
Block a user