#!@PERL@ # # hpijs-remover - Removes the foomatic XML files for HP's "hpijs" # inkjet printer driver (http://hpinkjet.sourceforge.net/) # # Copyright 2002 Till Kamppeter # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Was a path for the database given on the command line? my $libdir = "../.."; if ($ARGV[0]) { $libdir = $ARGV[0]; } # Remove generated files from the database if ( -d "$libdir/db/source/driver/" ) { print "Removing HPIJS Foomatic entries ...\n"; unlink("$libdir/db/source/driver/hpijs.xml") || die "Cannot remove $libdir/db/source/driver/hpijs.xml\n"; unlink("$libdir/db/source/opt/hpijs-Model.xml") || die "Cannot remove $libdir/db/source/opt/hpijs-Model.xml\n"; unlink("$libdir/db/source/opt/hpijs-PageSize.xml") || die "Cannot remove $libdir/db/source/opt/hpijs-PageSize.xml\n"; unlink("$libdir/db/source/opt/hpijs-Resolution.xml") || die "Cannot remove $libdir/db/source/opt/hpijs-Resolution.xml\n"; unlink("$libdir/db/source/opt/hpijs-Duplex.xml") || die "Cannot remove $libdir/db/source/opt/hpijs-Duplex.xml\n"; unlink("$libdir/db/source/opt/hpijs-InputSlot.xml") || die "Cannot remove $libdir/db/source/opt/hpijs-InputSlot.xml\n"; } # Done print "\nDone,\n\n"; exit 0;