freebsd-ports/shells/bash/pkg-install
Oliver Eikemeier 875ebd31e7 - better reflect `bash --version' in PORTVERSION
- new shopt colonbreakswords
- fix default PATH
2004-10-14 13:24:20 +00:00

20 lines
352 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
BASH="${PKG_PREFIX-/usr/local}/bin/bash"
SHELLS="${PKG_DESTDIR-}/etc/shells"
case $2 in
POST-INSTALL)
if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$BASH\$" "$SHELLS"; then
if [ `id -u` -eq 0 ]; then
echo "$BASH" >> "$SHELLS"
else
echo "Not root, please add $BASH to $SHELLS manually"
fi
fi
;;
esac