[xml/sgml-commit] [linuxdoc-tools] 08/16: doc/Makedoc.sh: Make dvips honour /etc/papersize if letter. a4 otherwise.

Agustín Martín Domingo agmartin at moszumanska.debian.org
Mon Oct 19 11:31:22 UTC 2015


This is an automated email from the git hooks/post-receive script.

agmartin pushed a commit to branch upstream
in repository linuxdoc-tools.

commit 04fab950f7893d4f57c0e1764bf0cc018de6f504
Author: Agustin Martin Domingo <agmartin at debian.org>
Date:   Wed Oct 14 12:01:12 2015 +0200

    doc/Makedoc.sh: Make dvips honour /etc/papersize if letter. a4 otherwise.
    
    Signed-off-by: Agustin Martin Domingo <agmartin at debian.org>
---
 doc/Makedoc.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/doc/Makedoc.sh b/doc/Makedoc.sh
index fc6fa2d..b4a26f0 100644
--- a/doc/Makedoc.sh
+++ b/doc/Makedoc.sh
@@ -130,7 +130,14 @@ for docformat in ${BUILDDOC_FORMATS}; do
 
 		if [ -n "`which dvips`" ]; then
 		    echo "   + dvips" >&2
-		    dvips -t letter -o ./guide.ps ./guide.dvi
+		    DVIPS_PAPER="a4"
+		    if [ -r /etc/papersize ]; then
+			TMP_PAPER=`head -n 1 /etc/papersize`
+			if [ "${TMP_PAPER}" = "letter" ]; then
+			    DVIPS_PAPER="letter"
+			fi
+		    fi
+		    dvips -t ${DVIPS_PAPER} -o ./guide.ps ./guide.dvi
 		    if [ -n "`which gzip`" -a -f ./guide.ps ]; then
 			gzip -fN ./guide.ps
 		    fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-xml-sgml/linuxdoc-tools.git



More information about the debian-xml-sgml-commit mailing list