summaryrefslogtreecommitdiff
path: root/src/cups/cups-genppdupdate.in
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2008-10-26 16:16:44 +0000
committerRoger Leigh <rleigh@debian.org>2008-10-26 16:16:44 +0000
commit92b02ddce00dec2787514568fa9d644d4f0350e9 (patch)
tree015c66d9d7d4298a26554d12bb84c83d5c477f0e /src/cups/cups-genppdupdate.in
parent3950c83c2919fe59dbf442c0d4859778fadd0e8d (diff)
Imported Upstream version 5.0.0
Diffstat (limited to 'src/cups/cups-genppdupdate.in')
-rw-r--r--src/cups/cups-genppdupdate.in16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/cups/cups-genppdupdate.in b/src/cups/cups-genppdupdate.in
index b0c3b0b..1a1a8f4 100644
--- a/src/cups/cups-genppdupdate.in
+++ b/src/cups/cups-genppdupdate.in
@@ -1,5 +1,5 @@
#! @PERL@ -w
-# $Id: cups-genppdupdate.in,v 1.24 2006/03/29 02:27:15 rlk Exp $
+# $Id: cups-genppdupdate.in,v 1.25 2006/05/22 20:25:51 rleigh Exp $
# Update CUPS PPDs for Gutenprint queues.
# Copyright (C) 2002-2003 Roger Leigh (rleigh@debian.org)
#
@@ -131,13 +131,15 @@ if (@ppdglob) {
chomp;
push @ppd_files, $_;
}
- open PPDFILES, '-|', 'egrep', '-i', '-L', 'Foomatic', @ppd_files or die "can't grep $ppdlist: $!";
- @ppd_files = ();
- while (<PPDFILES>) {
- chomp;
- push @ppd_files, $_;
+ if (@ppd_files) {
+ open PPDFILES, '-|', 'egrep', '-i', '-L', 'Foomatic', @ppd_files or die "can't grep $ppdlist: $!";
+ @ppd_files = ();
+ while (<PPDFILES>) {
+ chomp;
+ push @ppd_files, $_;
+ }
+ close PPDFILES or ($! == 0) or die "can't close grep pipe: $!";
}
- close PPDFILES or ($! == 0) or die "can't close grep pipe: $!";
}