#!/bin/sh

# Shell script to run after the uninstall of the scc software.
# Copyright (C) 2001-2004 Open Challenge B.V.
# Copyright (C) 2004-2005 OpenEyeT Professional Services.
#
# 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, 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; see the file COPYING.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Contact information: www.OpenEyeT.nl/scc/index.html 

# SCC-release:	1.6.26
# file-version:	$Revision: 1.3 $

# Do not use POSIX features in this script as it can be sourced by a non-POSIX system shell!

SCC_BIN=/opt/scc/bin
SCC_TOP=/var/opt/scc
export SCC_BIN SCC_TOP

scripts_present=`ls ${SCC_BIN} 2>/dev/null`
if [ -n "${scripts_present}" ]
then
	# Upon upgrading by means of rpm -U scc-X.rpm,
	# the postremove is called after installing the new version.
	# In that case we should not remove anything.
	:
else
	# This is the "real" remove. Remove additional directories and files.
	rm -rf ${SCC_TOP} /opt/scc /etc/opt/scc
fi

exit 0
