#!/bin/sh
# (c) Copyright 2006-2009. CodeWeavers, Inc.
# To trigger logging, use a command of the form:
# pkgadd/rm -v ... 2>&1 | tee pkg.log
if echo $- | grep x >/dev/null
then
echo >&2
echo "***** `date`" >&2
echo "Starting: $0 $@" >&2
env >&2
CX_LOG="-"
export CX_LOG
fi
CX_ROOT="$BASEDIR/$CX_PKGINST"
CX_BOTTLE="@bottle@"
export CX_ROOT CX_BOTTLE
# Uninstall the bottle before cxbottle.conf gets deleted
"$CX_ROOT/bin/cxbottle" --removeall
# The drive_c/ directory was created by the postinstall script,
# so remove it ourselves
rm -rf "$CX_ROOT/support/$CX_BOTTLE/drive_c"
# Remove some other files that we know are created at run-time
# so pkgrm does not complain about the bottle directory not being empty
rm -rf "$CX_ROOT/support/$CX_BOTTLE/files"
exit 0