freebsd-ports/shells/psh/files/pkg-deinstall.in
Renato Botelho ee518f4189 - Update to 1.8.1 [1]
- Use DATADIR in pkg-plist
- Move pkg-install and pkg-deinstall to files/ and use SUB_FILES
- Change MASTER_SITES to use MASTER_SITE_PERL_CPAN

PR:		ports/115281 [1]
Submitted by:	Felippe de Meirelles Motta <lippe@freebsdbrasil.com.br> [1]
2007-08-08 13:12:42 +00:00

22 lines
403 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
PSH="%%PREFIX%%/bin/psh"
SHELLS="/etc/shells"
case $2 in
DEINSTALL)
if grep -qs "^$PSH\$" "$SHELLS"; then
if [ `id -u` -eq 0 ]; then
TMPSHELLS=`mktemp -t shells`
grep -v "^$PSH\$" "$SHELLS" > "$TMPSHELLS"
cat "$TMPSHELLS" > "$SHELLS"
rm "$TMPSHELLS"
else
echo "Not root, please remove $PSH from $SHELLS manually"
fi
fi
;;
esac