From 5b0c3e4ef70676cd1f0ed4a9dcb301156615fb77 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Sep 05 2008 14:49:35 +0000 Subject: No longer need foomatic-ppdopts. --- diff --git a/foomatic-ppdopts b/foomatic-ppdopts deleted file mode 100755 index e9cb92e..0000000 --- a/foomatic-ppdopts +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/perl - -use Getopt::Std; -getopts("hr:"); -help() if $opt_h; -$libdir=$opt_r if $opt_r; - -use Foomatic::PPD; -use Foomatic::Defaults; - -my $file = $ARGV[0]; -my $printer = $ARGV[1]; -my $driver = $ARGV[2]; - -if (! -f "$libdir/db/source/printer/$printer.xml") { - die "Printer $printer does not seem to exist in the database!\n"; -} - -if (! -f $file) { - die "The PPD file you specified, $file, does not seem to exist!\n"; -} - -# Load the PPD -my $p = new Foomatic::PPD $file, $printer; - -# Normal behavior, save as various option files by ID -my @opts = $p->foo_options(); -for (@opts) { - my ($id, $xml) = ($_->{'id'}, $_->{'xml'}); - my $ofile = "$libdir/db/source/opt/$id.xml"; - if (-f "$ofile") { die "Output file $ofile already exists\n"; } - open TMP, ">$ofile" or die "Cannot write $ofile!\n"; - print STDERR "Writing $ofile\n"; - # Fix section> - print TMP join('',@{$xml}); - close TMP; -} -exit(0); - -sub help { - select STDERR; - print "\n"; - print "Usage: foomatic-ppdopts filename.ppd printer-id\n"; - print "\n"; - exit(1); -}