diff --git a/mv-protokolle/Makefile b/mv-protokolle/Makefile index a6435f0ad282c9ff0b9b43b4927a055c49056365..cb12d0c041097ae679bc02a970f510e226a4ecea 100644 --- a/mv-protokolle/Makefile +++ b/mv-protokolle/Makefile @@ -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-) "$<" diff --git a/scripts/vc b/scripts/vc index 8e1988edbfec0072835fee0a267a063d9b5f9286..233a68087d15d5888a82735b4bb0f109d70b3f6a 100755 --- a/scripts/vc +++ b/scripts/vc @@ -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