#! /bin/sh #---------------------------------------------------------------------------- # /var/install/deinstall/mono-complete - deinstall script # # Creation : 2014-09-10 holbru # Last update: $Id$ # # Copyright (c) 2014-@@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=mono-complete # set filelist filelist=/etc/filelist.d/${package_name}-files.txt # check for update is given if [ "${1}" = "--update" ] then update=true fi # --------------------------------------------------------------------------- # remove program files # --------------------------------------------------------------------------- while read id perm user group package file do case ${id} in b|u|s) # remove program files if [ "${file}" != "tmp/install.sh" \ -a "${file}" != "tmp/preinstall.sh" ] then rm -f /${file} fi ;; f) # remove directories rmdir --ignore-fail-on-non-empty /${file} 2>/dev/null ;; esac done < ${filelist} # --------------------------------------------------------------------------- # stop for update only # --------------------------------------------------------------------------- if ${update:-false} then exit 0 fi mono_packages="mono mono-data mono-data-db2 mono-data-oracle mono-data-postgresql mono-data-sqlite mono-entityframework mono-extras mono-locale-extras mono-mvc mono-nunit mono-reactive mono-wcf mono-web mono-winforms mono-winfxcore libmono libmono-dev libmonosgen libmonosgen-dev mono-dev" for _pack in ${mono_packages} do if [ -f /var/install/deinstall/${_pack} ] then /var/install/bin/del-package -p ${_pack} fi done exit 0 # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------