summaryrefslogtreecommitdiff
path: root/src/cups/cups-genppdupdate.in
diff options
context:
space:
mode:
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: $!";
}