summaryrefslogtreecommitdiff
path: root/debian/parseconfig.pl
diff options
context:
space:
mode:
authorDidier Raboud <didier@raboud.com>2010-05-23 00:07:10 +0200
committerDidier Raboud <didier@raboud.com>2010-05-23 00:07:10 +0200
commitf56211f0ff4ddf9371ebc4c31e8f95df1fc81a5c (patch)
treea24f15ea2fc96e0688e96c58e35dde7adeaef3fb /debian/parseconfig.pl
parentb834bd56528993fa05a5645da808227aee3e9de7 (diff)
parent014f0e14a3c6a044d99a67c8f4e1c4065452479e (diff)
Merge branch 'upstream'
Conflicts: debian/README.Debian debian/changelog debian/control debian/copyright debian/foomatic-filters.config debian/foomatic-filters.postinst debian/foomatic-filters.postrm debian/foomatic-filters.templates debian/parseconfig.pl debian/po/de.po debian/po/fr.po debian/po/ja.po debian/po/nl.po debian/po/pt_BR.po debian/po/templates.pot debian/po/tr.po debian/rules
Diffstat (limited to 'debian/parseconfig.pl')
-rw-r--r--debian/parseconfig.pl44
1 files changed, 0 insertions, 44 deletions
diff --git a/debian/parseconfig.pl b/debian/parseconfig.pl
deleted file mode 100644
index b9854ee..0000000
--- a/debian/parseconfig.pl
+++ /dev/null
@@ -1,44 +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{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};