aboutsummaryrefslogtreecommitdiffstats
path: root/shells/bash/pkg-install
diff options
context:
space:
mode:
authoreik <eik@FreeBSD.org>2004-10-14 21:24:20 +0800
committereik <eik@FreeBSD.org>2004-10-14 21:24:20 +0800
commitc8cee13ac25702c74a52458ba38f8c1da5c151cc (patch)
tree44ca717781e6e475887c3a407dbdebe1c8fbe7b5 /shells/bash/pkg-install
parent2b7ed50fbb42c8357070caad489655359021623d (diff)
downloadfreebsd-ports-gnome-c8cee13ac25702c74a52458ba38f8c1da5c151cc.tar.gz
freebsd-ports-gnome-c8cee13ac25702c74a52458ba38f8c1da5c151cc.tar.zst
freebsd-ports-gnome-c8cee13ac25702c74a52458ba38f8c1da5c151cc.zip
- better reflect `bash --version' in PORTVERSION
- new shopt colonbreakswords - fix default PATH
Diffstat (limited to 'shells/bash/pkg-install')
-rw-r--r--shells/bash/pkg-install9
1 files changed, 6 insertions, 3 deletions
diff --git a/shells/bash/pkg-install b/shells/bash/pkg-install
index b234a4db0e0a..c84878485e07 100644
--- a/shells/bash/pkg-install
+++ b/shells/bash/pkg-install
@@ -3,13 +3,16 @@
# $FreeBSD$
#
+BASH="${PKG_PREFIX-/usr/local}/bin/bash"
+SHELLS="${PKG_DESTDIR-}/etc/shells"
+
case $2 in
POST-INSTALL)
- if ! grep -qs "^${PKG_PREFIX-/usr/local}/bin/bash\$" /etc/shells; then
+ if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$BASH\$" "$SHELLS"; then
if [ `id -u` -eq 0 ]; then
- echo "${PKG_PREFIX-/usr/local}/bin/bash" >> /etc/shells
+ echo "$BASH" >> "$SHELLS"
else
- echo "Not root, please add ${PKG_PREFIX-/usr/local}/bin/bash to /etc/shells manually"
+ echo "Not root, please add $BASH to $SHELLS manually"
fi
fi
;;