diff options
Diffstat (limited to 'shells/bashc/pkg-install')
-rw-r--r-- | shells/bashc/pkg-install | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/shells/bashc/pkg-install b/shells/bashc/pkg-install new file mode 100644 index 000000000000..03fcbd2126dc --- /dev/null +++ b/shells/bashc/pkg-install @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/shells/bashc/pkg-install,v 1.1 2008-03-11 22:38:46 alepulver Exp $ +# + +BASHC="$(echo ${PKG_PREFIX-/usr/local}/bin/bashc | /usr/bin/sed -e 's|//|/|g')" +SHELLS="/etc/shells" + +case $2 in +POST-INSTALL) + if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$BASHC\$" "$SHELLS"; then + if [ `id -u` -eq 0 ]; then + echo "$BASHC" >> "$SHELLS" + else + echo "Not root, please add $BASHC to $SHELLS manually" + fi + fi + ;; +esac |