diff options
author | abs <abs> | 2001-06-26 10:41:25 +0000 |
---|---|---|
committer | abs <abs> | 2001-06-26 10:41:25 +0000 |
commit | 2e125e72dedf0565fb461dff75632c66599ad5f2 (patch) | |
tree | 3778729d1187f25080c6c26a87ed6f5f22f1b91b /print | |
parent | ffb67a80706f34fbf868e84db202ea8ce9a6d006 (diff) | |
download | pkgsrc-2e125e72dedf0565fb461dff75632c66599ad5f2.tar.gz |
Updated if-psprint to 1.4
Add '-v' option to display spool settings
Diffstat (limited to 'print')
-rw-r--r-- | print/if-psprint/Makefile | 4 | ||||
-rwxr-xr-x | print/if-psprint/files/if-psprint.pl | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/print/if-psprint/Makefile b/print/if-psprint/Makefile index 5b84e1e997d..4266bdd5bfd 100644 --- a/print/if-psprint/Makefile +++ b/print/if-psprint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.5 2001/02/17 17:51:45 wiz Exp $ +# $NetBSD: Makefile,v 1.6 2001/06/26 10:41:25 abs Exp $ # -DISTNAME= if-psprint-1.3 +DISTNAME= if-psprint-1.4 CATEGORIES= print MASTER_SITES= # empty DISTFILES= # empty diff --git a/print/if-psprint/files/if-psprint.pl b/print/if-psprint/files/if-psprint.pl index 4330dfeb955..03e8b09fd3c 100755 --- a/print/if-psprint/files/if-psprint.pl +++ b/print/if-psprint/files/if-psprint.pl @@ -1,6 +1,6 @@ #!@PREFIX@/bin/perl -w # -# $NetBSD: if-psprint.pl,v 1.4 2000/12/05 15:49:37 abs Exp $ +# $NetBSD: if-psprint.pl,v 1.5 2001/06/26 10:41:25 abs Exp $ # # Copyright (c) 2000 David Brownlee <abs@netbsd.org>. All rights # reserved. Provided as-is without express or implied warranties. @@ -111,7 +111,7 @@ my( $user, # Parse options (ignore most) # -&getopt('w:l:i:n:h:', \%opt); +&getopts('vw:l:i:n:h:', \%opt); $user = $opt{'n'}; $user ||= $ENV{'USER'}; $spoolhost = $opt{'h'}; @@ -119,7 +119,7 @@ if (!$spoolhost) { chomp($spoolhost = `hostname`); } if (@ARGV != 1 || $ARGV[0] !~ m#(\w+)(\.(\w+)|)(/smb/.*/.*|)#) - { &usage_and_exit; } + { usage_and_exit(); } $device = $1; $model = $3; $dest = $4; @@ -153,6 +153,8 @@ if ($dest) if ($spool eq '') { $spool = '>&STDOUT'; } +if ($opt{'v'}) + { print STDERR "$spool\n"; } # Spool output # if (!open(OUTPUT, $spool)) @@ -208,11 +210,15 @@ sub usage_and_exit { print "Usage: if-psprint [opts] gs_device[.gs_model]/smbdestination [opts] + -v Verbose -w width -l lines -i indent -n user -h host + +if-psprint is intended to be used from within printcap. See manpage for more +details. "; exit 1; } |