summaryrefslogtreecommitdiff
path: root/debian/parseconfig.pl
diff options
context:
space:
mode:
Diffstat (limited to 'debian/parseconfig.pl')
-rw-r--r--debian/parseconfig.pl53
1 files changed, 0 insertions, 53 deletions
diff --git a/debian/parseconfig.pl b/debian/parseconfig.pl
deleted file mode 100644
index 8a695e9..0000000
--- a/debian/parseconfig.pl
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/perl
-
-my $configpath = "/etc/foomatic";
-
-sub readConfFile
-{
- my ($file) = @_;
-
- my %conf;
- # Read config file if present
- if (open CONF, "< $file")
- {
- while (<CONF>)
- {
- $conf{$1}="$2" if (m/^\s*([^\#\s]\S*)\s*:\s*(.*)\s*$/);
- }
- close CONF;
- }
-
- return %conf;
-}
-
-%conf = readConfFile("$configpath/filter.conf");
-print( 'db_set foomatic-filters/filter_debug ',
- $conf{debug} > 0 ? 'true' : 'false', ";\n") if exists $conf{debug};
-if (exists $conf{gspath})
-{
- if ($conf{gspath} =~ m/^(gs|gs-esp|gs-aladdin|gs-gnu)$/) {
- print "db_set foomatic-filters/gspath $1;\n";
- } else {
- print "db_set foomatic-filters/gspath Custom;\n";
- print "db_set foomatic-filters/custom_gspath $conf{gspath};\n";
- }
-}
-if (exists $conf{textfilter})
-{
- if ($conf{textfilter} =~ m/^(a2ps|enscript|mpage)$/)
- {
- print "db_set foomatic-filters/textfilter $1;\n";
- }
- elsif ($conf{textfilter} =~ m/^\s*$/)
- {
- print "db_set foomatic-filters/textfilter Automagic;\n";
- }
- else
- {
- print "db_set foomatic-filters/textfilter Custom;\n";
- print "db_set foomatic-filters/custom_textfilter $conf{textfilter};\n";
- }
-}
-print( 'db_set foomatic-filters/ps_accounting ',
- $conf{ps_accounting} ? 'true' : 'false',
- "\n") if exists $conf{ps_accounting};