mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-14 03:10:47 +00:00
875ebd31e7
- new shopt colonbreakswords - fix default PATH
23 lines
437 B
Bash
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
|