aboutsummaryrefslogtreecommitdiff
path: root/lang/tcl83
diff options
context:
space:
mode:
authorTim Vanderhoek <hoek@FreeBSD.org>1999-05-26 00:34:26 +0000
committerTim Vanderhoek <hoek@FreeBSD.org>1999-05-26 00:34:26 +0000
commitb9d6168895181749a99d4cc17c4a595f2df6d6da (patch)
tree2746c47ed22952406ed30b52e88d4443172a7706 /lang/tcl83
parent2507ae279daa9223ea09302c7d7389bf9fbbd8b8 (diff)
downloadports-b9d6168895181749a99d4cc17c4a595f2df6d6da.tar.gz
ports-b9d6168895181749a99d4cc17c4a595f2df6d6da.zip
Don't unintentionally overwrite an existing tclsh/wish.
Reported-By: Mikhail Teterin <mi@kot.ne.mediaone.net>
Notes
Notes: svn path=/head/; revision=19000
Diffstat (limited to 'lang/tcl83')
-rw-r--r--lang/tcl83/pkg-install.tclsh8
1 files changed, 4 insertions, 4 deletions
diff --git a/lang/tcl83/pkg-install.tclsh b/lang/tcl83/pkg-install.tclsh
index 7133e84d294f..055957a6c36f 100644
--- a/lang/tcl83/pkg-install.tclsh
+++ b/lang/tcl83/pkg-install.tclsh
@@ -1,9 +1,9 @@
#!/bin/sh
# The user may have a tclsh they want to preserve
-if [ ! -f ${PKG_PREFIX}/bin/tclsh ] || [ \
- `grep -a awieYJFnsuILOnfsYEW ${PKG_PREFIX}/bin/tclsh | sed -e 's/.*\*\*//'` \
- -lt 001 ]
+ver=`grep -a awieYJFnsuILOnfsYEW ${PKG_PREFIX}/bin/tclsh 2> /dev/null \
+ | sed -e 's/.*\*\*//'`
+if [ ! -e ${PKG_PREFIX}/bin/tclsh ] || [ "$ver" != "" -a "$ver" -lt 001 ]
then
[ -f ${PKG_PREFIX}/bin/tclsh ] && chmod u+w ${PKG_PREFIX}/bin/tclsh
@@ -28,5 +28,5 @@ done
) 1>&2
exit 1
EOF
- chmod a+rx ${PKG_PREFIX}/bin/tclsh
+ chmod 555 ${PKG_PREFIX}/bin/tclsh
fi