freebsd-ports/ports-mgmt/portconf/pkg-deinstall
2006-06-11 08:56:14 +00:00

15 lines
310 B
Bash

#!/bin/sh
MAKE_CONF=/etc/make.conf
if [ "$2" = "POST-DEINSTALL" ]; then
echo -n "Cleaning up ${MAKE_CONF}..."
if [ -f ${MAKE_CONF} ]; then
sed -e "/# Begin portconf settings/,/# End portconf settings/d" \
-i "" ${MAKE_CONF}
if [ ! -s ${MAKE_CONF} ]; then
rm ${MAKE_CONF}
fi
fi
echo " Done."
fi