#!/usr/bin/sh
#----------------------------------------------------------------------------
# /tmp/preinstall.sh - hplip-base preinstallation
#
# Creation   :  2026-02-25 holbru
# Last update:  $Id$
#
# Copyright (c) 2026-@@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=hplip-base

# ---------------------------------------------------------------------------
# cleqn up
# ---------------------------------------------------------------------------
installed=$(/usr/bin/eisman check hplip 3.6.2)
if [ "${installed}" = "new" ]
then
    if [ -f /etc/filelist.d/hplip-files.txt ]
    then
        /usr/bin/sed -i '/usr\/bin/d; /share\/hplip/d; /python3.13/d' /etc/filelist.d/hplip-files.txt    
    fi
    /usr/bin/rm -rf /usr/share/hplip
fi

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