aboutsummaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2007-06-29 01:06:38 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2007-06-29 01:06:38 +0000
commit112e1f300874d9d1c2fbb578cece511b7a60d87b (patch)
tree99f873fafaaf75dfad812a17683d89aa5b89242b /shells
parent0287c477296ee65c52b422c55070da3e0baa5abc (diff)
downloadports-112e1f300874d9d1c2fbb578cece511b7a60d87b.tar.gz
ports-112e1f300874d9d1c2fbb578cece511b7a60d87b.zip
Notes
Diffstat (limited to 'shells')
-rw-r--r--shells/bash/pkg-deinstall8
-rw-r--r--shells/bash/pkg-install8
2 files changed, 8 insertions, 8 deletions
diff --git a/shells/bash/pkg-deinstall b/shells/bash/pkg-deinstall
index 3e19db4b1637..9552db126262 100644
--- a/shells/bash/pkg-deinstall
+++ b/shells/bash/pkg-deinstall
@@ -3,8 +3,8 @@
# $FreeBSD$
#
-BASH="${PKG_PREFIX-/usr/local}/bin/bash"
-RBASH="${PKG_PREFIX-/usr/local}/bin/rbash"
+BASH="$(echo ${PKG_PREFIX-/usr/local}/bin/bash | /usr/bin/sed -e 's|//|/|g')"
+RBASH="$(echo ${PKG_PREFIX-/usr/local}/bin/rbash | /usr/bin/sed -e 's|//|/|g')"
SHELLS="${PKG_DESTDIR-}/etc/shells"
case $2 in
@@ -12,7 +12,7 @@ DEINSTALL)
if grep -qs "^$BASH\$" "$SHELLS"; then
if [ `id -u` -eq 0 ]; then
TMPSHELLS=`mktemp -t shells`
- grep -v "^$(echo "$BASH" | /usr/bin/sed -e 's|//|/|g')\$" "$SHELLS" > "$TMPSHELLS"
+ grep -v "^$BASH\$" "$SHELLS" > "$TMPSHELLS"
cat "$TMPSHELLS" > "$SHELLS"
rm "$TMPSHELLS"
else
@@ -22,7 +22,7 @@ DEINSTALL)
if grep -qs "^$RBASH\$" "$SHELLS"; then
if [ `id -u` -eq 0 ]; then
TMPSHELLS=`mktemp -t shells`
- grep -v "^$(echo "$RBASH" | /usr/bin/sed -e 's|//|/|g')\$" "$SHELLS" > "$TMPSHELLS"
+ grep -v "^$RBASH\$" "$SHELLS" > "$TMPSHELLS"
cat "$TMPSHELLS" > "$SHELLS"
rm "$TMPSHELLS"
else
diff --git a/shells/bash/pkg-install b/shells/bash/pkg-install
index 8aa663d21621..37a63a755364 100644
--- a/shells/bash/pkg-install
+++ b/shells/bash/pkg-install
@@ -3,22 +3,22 @@
# $FreeBSD$
#
-BASH="${PKG_PREFIX-/usr/local}/bin/bash"
-RBASH="${PKG_PREFIX-/usr/local}/bin/rbash"
+BASH="$(echo ${PKG_PREFIX-/usr/local}/bin/bash | /usr/bin/sed -e 's|//|/|g')"
+RBASH="$(echo ${PKG_PREFIX-/usr/local}/bin/rbash | /usr/bin/sed -e 's|//|/|g')"
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" | /usr/bin/sed -e 's|//|/|g' >> "$SHELLS"
+ echo "$BASH" >> "$SHELLS"
else
echo "Not root, please add $BASH to $SHELLS manually"
fi
fi
if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$RBASH\$" "$SHELLS"; then
if [ `id -u` -eq 0 ]; then
- echo "$RBASH" | /usr/bin/sed -e 's|//|/|g' >> "$SHELLS"
+ echo "$RBASH" >> "$SHELLS"
else
echo "Not root, please add $RBASH to $SHELLS manually"
fi