diff options
Diffstat (limited to 'print/papersize')
-rw-r--r-- | print/papersize/Makefile | 4 | ||||
-rw-r--r-- | print/papersize/files/getpapersize | 11 | ||||
-rw-r--r-- | print/papersize/files/setpapersize | 10 |
3 files changed, 20 insertions, 5 deletions
diff --git a/print/papersize/Makefile b/print/papersize/Makefile index 207d8cbda02..b1b5127f3ba 100644 --- a/print/papersize/Makefile +++ b/print/papersize/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.15 2003/09/08 17:38:34 jmmv Exp $ +# $NetBSD: Makefile,v 1.16 2003/09/15 10:51:39 agc Exp $ # -DISTNAME= papersize-1.0.7 +DISTNAME= papersize-1.0.8 WRKSRC= ${WRKDIR} CATEGORIES= print MASTER_SITES= # empty diff --git a/print/papersize/files/getpapersize b/print/papersize/files/getpapersize index 52d018cf5b0..ca7e6f390ef 100644 --- a/print/papersize/files/getpapersize +++ b/print/papersize/files/getpapersize @@ -1,12 +1,12 @@ #!@SH@ # -# $NetBSD: getpapersize,v 1.8 2003/09/08 17:38:34 jmmv Exp $ +# $NetBSD: getpapersize,v 1.9 2003/09/15 10:51:40 agc Exp $ # # Small shell script to show the default papersize for packages # if [ $# -eq 0 ]; then - pkgs="a2ps ddd enscript ghostscript gv magicfilter psutils"; + pkgs="a2ps ddd enscript ghostscript gv lout magicfilter psutils"; else pkgs=$@ fi @@ -54,6 +54,13 @@ while [ $# -gt 0 ]; do @AWK@ '/^GV.fallbackPageMedia:/ { print $2; }' $f fi ;; + lout) + f=@LOCALBASE@/share/lout/include/dsf + if [ -s "$f" ]; then + @ECHO@ -n "$1 has default papersize: " + @AWK@ '$1 == "named" && $2 == "@PageType" { print $4; }' $f + fi + ;; magicfilter) magicdir=@LOCALBASE@/libexec/magicfilter if [ -s $magicdir ]; then diff --git a/print/papersize/files/setpapersize b/print/papersize/files/setpapersize index 8df4b03e53e..292990c9e9e 100644 --- a/print/papersize/files/setpapersize +++ b/print/papersize/files/setpapersize @@ -1,6 +1,6 @@ #!@SH@ # -# $NetBSD: setpapersize,v 1.9 2003/09/08 17:38:34 jmmv Exp $ +# $NetBSD: setpapersize,v 1.10 2003/09/15 10:51:40 agc Exp $ # # Small shell script to set the default papersize for packages # @@ -85,6 +85,14 @@ while [ $# -gt 0 ]; do @ECHO@ "Set $1 package default paper size to $papersize in $gvfile" fi ;; + lout) + loutfile=@LOCALBASE@/share/lout/include/dsf + if [ -s "$loutfile" ]; then + @MV@ $loutfile $loutfile.old + env PAPERSIZE=$papersize @AWK@ '$1 == "named" && $2 == "@PageType" { printf(" %s %s\t\t{ %s\t%s %s # page type (width, height)\n", $1, $2, ENVIRON["PAPERSIZE"], $5, $6); next } { print $0 }' $loutfile.old > $loutfile + @ECHO@ "Set $1 package default paper size to $papersize in $loutfile" + fi + ;; magicfilter) magicdir=@LOCALBASE@/libexec/magicfilter if [ -s "$magicdir" ]; then |