pkgsrc-wip/pts/DEINSTALL

37 lines
659 B
Bash

#!/bin/sh
# $NetBSD: DEINSTALL,v 1.1.1.1 2003/04/13 08:25:30 jmmv Exp $
PKGNAME=$1
STAGE=$2
REMOVED="no"
LIST="${PKG_PREFIX}/share/pts/game.winlist \
${PKG_PREFIX}/share/pts/pts.lmsg \
${PKG_PREFIX}/share/pts/pts.profile \
${PKG_PREFIX}/share/pts/logs \
${PKG_PREFIX}/share/pts/dstats"
case ${STAGE} in
DEINSTALL)
for to_trash in ${LIST}; do
if [ -e "${to_trash}" ]; then
REMOVED="yes"
if [ -d "${to_trash}" ]; then
rm -rf ${to_trash}/*
elif [ -f "${to_trash}" ]; then
rm ${to_trash}
fi
fi
done
;;
POST-DEINSTALL)
;;
*)
echo "Unexpected argument: ${STAGE}"
exit 1
;;
esac
exit 0