#!/usr/bin/perl -w

!system(qw(dpkg --assert-multi-conrep)) or
    die "You must first upgrade dpkg to version >= 1.6.8!";

# tetex-bin preinst script.
#
# Perl version by Carey Evans <c.evans@clear.net.nz> and Christian
# Schwarz <schwarz@monet.m.isar.de>, based on tetex-bin.preinst from
# tetex-bin_04pl8-3 by Christoph Martin <martin@uni-mainz.de>.
#
# This script may be distributed under the terms of the GNU GPL.

use strict;

$| = 1;

if (@ARGV == 0 or $ARGV[0] ne 'install') {
  if (-l "/var/lib/texmf/web2c") {
      unlink "/var/lib/texmf/web2c";
  }
  if (-l "/usr/lib/texmf/web2c") {
      unlink "/usr/lib/texmf/web2c";
  }
  if (-l "/usr/share/texmf/web2c") {
      unlink "/usr/lib/texmf/web2c";
  }
  if (@ARGV > 1 and $ARGV[1] lt "0.9-1") {
      unlink "/usr/doc/tetex-bin";
  }
  exit 0;
}



#DEBHELPER#

exit 0;
