1#!@PERL@ 2# 3# hpijs-rss-remover - Removes the foomatic XML files for the "hpijs-rss" 4# driver (patched HPIJS, 5# http://www.linuxprinting.org/download/printing/hpijs/) 6# 7# Copyright 2002 Till Kamppeter <till.kamppeter@gmx.net> 8# 9# This program is free software; you can redistribute it and/or modify it 10# under the terms of the GNU General Public License as published by the Free 11# Software Foundation; either version 2 of the License, or (at your option) 12# any later version. 13# 14# This program is distributed in the hope that it will be useful, but 15# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17# for more details. 18# 19# You should have received a copy of the GNU General Public License 20# along with this program; if not, write to the Free Software 21# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22# 23 24# Was a path for the database given on the command line? 25 26my $libdir = "../.."; 27if ($ARGV[0]) { 28 $libdir = $ARGV[0]; 29} 30 31# Remove generated files from the database 32 33if ( -d "$libdir/db/source/driver/" ) { 34 print "Removing HPIJS-RSS Foomatic entries ...\n"; 35 unlink("$libdir/db/source/driver/hpijs-rss.xml") || 36 die "Cannot remove $libdir/db/source/driver/hpijs-rss.xml\n"; 37 unlink("$libdir/db/source/opt/hpijs-rss-Model.xml") || 38 die "Cannot remove $libdir/db/source/opt/hpijs-rss-Model.xml\n"; 39 unlink("$libdir/db/source/opt/hpijs-rss-PageSize.xml") || 40 die "Cannot remove $libdir/db/source/opt/hpijs-rss-PageSize.xml\n"; 41 unlink("$libdir/db/source/opt/hpijs-rss-Resolution.xml") || 42 die "Cannot remove $libdir/db/source/opt/hpijs-rss-Resolution.xml\n"; 43 unlink("$libdir/db/source/opt/hpijs-rss-Duplex.xml") || 44 die "Cannot remove $libdir/db/source/opt/hpijs-rss-Duplex.xml\n"; 45 unlink("$libdir/db/source/opt/hpijs-rss-InputSlot.xml") || 46 die "Cannot remove $libdir/db/source/opt/hpijs-rss-InputSlot.xml\n"; 47} 48 49# Done 50 51print "\nDone,\n\n"; 52exit 0; 53