diff options
author | hoek <hoek@FreeBSD.org> | 1999-05-26 08:34:26 +0800 |
---|---|---|
committer | hoek <hoek@FreeBSD.org> | 1999-05-26 08:34:26 +0800 |
commit | 9456b0e538bc6fc2f1e8fe8809260e8a5f790096 (patch) | |
tree | 1264388f249916c70edc3a897a14808074d463e9 /lang/tcl80 | |
parent | f7b619b1a9522a2a05199562433cf3a4e1b87296 (diff) | |
download | freebsd-ports-gnome-9456b0e538bc6fc2f1e8fe8809260e8a5f790096.tar.gz freebsd-ports-gnome-9456b0e538bc6fc2f1e8fe8809260e8a5f790096.tar.zst freebsd-ports-gnome-9456b0e538bc6fc2f1e8fe8809260e8a5f790096.zip |
Don't unintentionally overwrite an existing tclsh/wish.
Reported-By: Mikhail Teterin <mi@kot.ne.mediaone.net>
Diffstat (limited to 'lang/tcl80')
-rw-r--r-- | lang/tcl80/pkg-install.tclsh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lang/tcl80/pkg-install.tclsh b/lang/tcl80/pkg-install.tclsh index 7133e84d294f..055957a6c36f 100644 --- a/lang/tcl80/pkg-install.tclsh +++ b/lang/tcl80/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 |