diff --git a/IV/Makefile b/IV/Makefile index eecfe21..9c276f1 100644 --- a/IV/Makefile +++ b/IV/Makefile @@ -141,7 +141,7 @@ version.inc.tex: Makefile $(shell git rev-parse --git-dir 2>/dev/null) TZ=UTC date '+\gdef\VCDescribe{%F ($(REF))}%' > $@ vars.inc.tex: vars.awk wm.sql Makefile - ./$< wm.sql > $@ + awk -f $< wm.sql slides-2021-03-29.pdf: slides-2021-03-29.txt pandoc -t beamer -i $< -o $@ diff --git a/IV/vars.awk b/IV/vars.awk old mode 100755 new mode 100644 index 3bee31f..e7b1a8e --- a/IV/vars.awk +++ b/IV/vars.awk @@ -1,20 +1,19 @@ #!/usr/bin/awk -f -BEGIN { - FS="[() ]" -} +BEGIN { FS="[() ]" } /small_angle constant real default radians/ { if(d) { exit 1 } else { - printf ("\\newcommand{\\smallAngle}{\\frac{\\pi}{%d}}\n",180/$8); - d=1 + d = sprintf("\\newcommand{\\smallAngle}{\\frac{\\pi}{%d}}\n",180/$8); } } END{ - if(!d){ + if(d) { + print d > "vars.inc.tex" + } else { exit 1 } }