#!/usr/bin/perl
#
# hpijs-remover - Removes the foomatic XML files for HP's "hpijs"
#                 inkjet printer driver (http://hpinkjet.sourceforge.net/)
#
# Copyright 2002 Till Kamppeter <till.kamppeter@gmx.net>
#
#   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.
#

# Remove generated files from the database

if ( -d "../../db/source/driver/" ) {
    print "Removing HPIJS Foomatic entries ...\n";
    unlink("../../db/source/driver/hpijs.xml") ||
	die "Cannot remove db/source/driver/hpijs.xml\n";
    unlink("../../db/source/opt/hpijs-Model.xml") ||
	die "Cannot remove db/source/opt/hpijs-Model.xml\n";
    unlink("../../db/source/opt/hpijs-PageSize.xml") ||
	die "Cannot remove db/source/opt/hpijs-PageSize.xml\n";
    unlink("../../db/source/opt/hpijs-Quality.xml") ||
	die "Cannot remove db/source/opt/hpijs-Quality.xml\n";
    unlink("../../db/source/opt/hpijs-Duplex.xml") ||
	die "Cannot remove db/source/opt/hpijs-Duplex.xml\n";
}

# Done

print "\nDone,\n\n";
exit 0;
