Skip to content
Snippets Groups Projects
Commit 9ca319e3 authored by rohieb's avatar rohieb
Browse files

scripts/vc: make it usable from different paths

parent 3fe55d4d
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ s0artcl.cls s0minutes.cls: stratum0-latex/stratum0-latex.ins stratum0-latex/s0ar
if [ ! -h s0minutes.cls ]; then ln -s stratum0-latex/s0minutes.cls . ; fi
vc.tex: ../.git/index ../.git/HEAD ../scripts/vc ../scripts/vc-git.awk
cd ../scripts; sh ./vc -m && mv vc.tex ..
../scripts/vc -m
%.pdf: %.tex vc.tex s0minutes.cls s0artcl.cls
$(latexmk) $(if $(PVC),-pvc,-pvc-) "$<"
......
......@@ -3,6 +3,8 @@
# The original file can be found at CTAN:support/vc.
# This file is Public Domain.
selfdir=$(dirname "$(realpath -e "${0}")")
# Parse command line options
full=0
mod=0
......@@ -30,12 +32,12 @@ logformat="${logformat}CommitterEmail: %ce%n"
logformat="${logformat}CommitterDate: %ci%n"
LC_ALL=C
git --no-pager log -1 HEAD --pretty=format:"$logformat" \
| gawk -v script=log -v full=$full -f vc-git.awk \
| gawk -v script=log -v full=$full -f "${selfdir}"/vc-git.awk \
> vc.tex
# Query modification status of the working copy
if [ "$mod" = 1 ]; then
git status --porcelain=v1 \
| gawk -v script=status -f vc-git.awk \
| gawk -v script=status -f "${selfdir}"/vc-git.awk \
>> vc.tex
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment