1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-14 03:10:47 +00:00
freebsd-ports/shells/bash/pkg-deinstall
Oliver Eikemeier 875ebd31e7 - better reflect `bash --version' in PORTVERSION
- new shopt colonbreakswords
- fix default PATH
2004-10-14 13:24:20 +00:00

23 lines
437 B
Bash

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