diff options
author | Ruben Undheim <ruben.undheim@gmail.com> | 2018-07-14 23:03:58 +0200 |
---|---|---|
committer | Ruben Undheim <ruben.undheim@gmail.com> | 2018-07-14 23:03:58 +0200 |
commit | 0186c9b0f02ab6728b0b97b227fc499caca899fa (patch) | |
tree | 8f1c5bb7130a5f30b19e53badb1f78a177ec0919 | |
parent | 4c778cc4954a2ca75622c303a64783146ee1c340 (diff) |
Set date also for appnotes.sh
-rw-r--r-- | debian/patches/0012-Set-date-also-for-appnotes.sh.patch | 47 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/debian/patches/0012-Set-date-also-for-appnotes.sh.patch b/debian/patches/0012-Set-date-also-for-appnotes.sh.patch new file mode 100644 index 00000000..c08ffc31 --- /dev/null +++ b/debian/patches/0012-Set-date-also-for-appnotes.sh.patch @@ -0,0 +1,47 @@ +From: Ruben Undheim <ruben.undheim@gmail.com> +Date: Sat, 14 Jul 2018 23:03:06 +0200 +Subject: Set date also for appnotes.sh + +--- + Makefile | 2 +- + manual/appnotes.sh | 5 ++++- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 78f0f58..aa66a54 100644 +--- a/Makefile ++++ b/Makefile +@@ -463,7 +463,7 @@ update-manual: $(TARGETS) $(EXTRA_TARGETS) + cd manual && ../yosys -p 'help -write-tex-command-reference-manual' + + manual: $(TARGETS) $(EXTRA_TARGETS) +- cd manual && bash appnotes.sh ++ cd manual && PDF_DATE=$(PDF_DATE) bash appnotes.sh + cd manual && PDF_DATE=$(PDF_DATE) bash presentation.sh + cd manual && PDF_DATE=$(PDF_DATE) bash manual.sh + +diff --git a/manual/appnotes.sh b/manual/appnotes.sh +index 0ae5286..798d9d3 100755 +--- a/manual/appnotes.sh ++++ b/manual/appnotes.sh +@@ -7,16 +7,19 @@ do + if [ -f $job/make.sh ]; then + cd $job + bash make.sh ++ sed -i 's#/CreationDate (D:[^)]\+)#/CreationDate ('${PDF_DATE}')#' *.pdf + cd .. + fi + old_md5=$([ -f $job.aux ] && md5sum < $job.aux || true) + while +- pdflatex -shell-escape -halt-on-error $job.tex || exit ++ pdflatex -shell-escape -halt-on-error '\pdfinfo{/CreationDate('${PDF_DATE}')/ModDate('${PDF_DATE}')}\input{'${job}'.tex}' || exit + new_md5=$(md5sum < $job.aux) + [ "$old_md5" != "$new_md5" ] + do + old_md5="$new_md5" + done ++ grep -av '^/ID \[\(<[0-9A-F]\{32\}>\) \1]$' ${job}.pdf > ${job}.pdf.without_pdf_id ++ mv -f ${job}.pdf.without_pdf_id ${job}.pdf + touch $job.ok + done + diff --git a/debian/patches/series b/debian/patches/series index e9e98dd1..de88021f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -9,3 +9,4 @@ kfreebsd-support.patch 0009-Some-spelling-errors-fixed.patch 0010-Replace-CreationDate-in-PDFs-generated-by-yosys.patch 0011-Set-CreationDate-explicitly-for-manual.tex-also.patch +0012-Set-date-also-for-appnotes.sh.patch |