OSX touch has no "--reference" long-option, only "-r"

This commit is contained in:
Steffen Jaeckel 2017-05-05 16:25:20 +02:00
parent c93bee9575
commit 5e4415427a

View File

@ -26,14 +26,14 @@ doxy: doxygen
crypt.pdf: crypt.tex
rm -f crypt.pdf $(LEFTOVERS)
cp crypt.tex crypt.bak
touch --reference=crypt.tex crypt.bak
touch -r crypt.tex crypt.bak
(printf "%s" "\def\fixedpdfdate{"; date +'D:%Y%m%d%H%M%S%:z' -d @$$(stat --format=%Y crypt.tex) | sed "s/:\([0-9][0-9]\)$$/'\1'}/g") > crypt-deterministic.tex
printf "%s\n" "\pdfinfo{" >> crypt-deterministic.tex
printf "%s\n" " /CreationDate (\fixedpdfdate)" >> crypt-deterministic.tex
printf "%s\n}\n" " /ModDate (\fixedpdfdate)" >> crypt-deterministic.tex
cat crypt.tex >> crypt-deterministic.tex
mv crypt-deterministic.tex crypt.tex
touch --reference=crypt.bak crypt.tex
touch -r crypt.bak crypt.tex
echo "hello" > crypt.ind
latex crypt $(silent_stdout)
latex crypt $(silent_stdout)