#!/bin/sh
#----------------------------------------------------------------------------
# /tmp/preinstall.sh - a2ps preinstallation
#
# Creation   :  2018-06-30 holbru
# Last update:  $Id$
#
# Copyright (c) 2018-@@YEAR@@ Holger Bruenjes, holgerbruenjes(at)gmx(dot)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.
#----------------------------------------------------------------------------

# set package name
package_name=a2ps

# ---------------------------------------------------------------------------
# update system
# ---------------------------------------------------------------------------
installed=$(eisman check ${package_name} 2.8.0)

if [ "${installed}" = "new" ]
then
    if [ -f /etc/filelist.d/a2ps-files.txt ]
    then
        sed -i '/usr\/share\/ghostscript/d' /etc/filelist.d/a2ps-files.txt
    fi
    if [ -L /usr/share/ghostscript ] 
    then 
        rm /usr/share/ghostscript
    fi
fi

exit 0
# ---------------------------------------------------------------------------
# end
# ---------------------------------------------------------------------------
