aboutsummaryrefslogtreecommitdiff
path: root/chinese/tcl83/pkg-deinstall.tclsh
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2001-02-22 03:53:36 +0000
committerKevin Lo <kevlo@FreeBSD.org>2001-02-22 03:53:36 +0000
commit06762bfda1e2a6dda7729f276248ae4b5a31f495 (patch)
tree3972608f83f491827696f2c1e15536025832b041 /chinese/tcl83/pkg-deinstall.tclsh
parent4b62c770fd4a80cb705dd235df68ad1aa3cd3aaf (diff)
Notes
Diffstat (limited to 'chinese/tcl83/pkg-deinstall.tclsh')
-rw-r--r--chinese/tcl83/pkg-deinstall.tclsh22
1 files changed, 22 insertions, 0 deletions
diff --git a/chinese/tcl83/pkg-deinstall.tclsh b/chinese/tcl83/pkg-deinstall.tclsh
new file mode 100644
index 000000000000..41d864a3c4bc
--- /dev/null
+++ b/chinese/tcl83/pkg-deinstall.tclsh
@@ -0,0 +1,22 @@
+#! /bin/sh
+#
+# Remove the ${PREFIX}/bin/tclsh script that gets installed by INSTALL.tclsh
+# if we are the last tclsh installation to be pkg_delete'd.
+#
+# $FreeBSD: /tmp/pcvs/ports/chinese/tcl83/Attic/pkg-deinstall.tclsh,v 1.1 2001-02-22 03:53:30 kevlo Exp $
+#
+
+#
+# Explicitly listing /usr/X11R6/bin here is debatable.
+#
+BINDIR="${PKG_PREFIX}/bin /usr/X11R6/bin"
+TCLSH=${PKG_PREFIX}/bin/tclsh
+
+tclshs=$(/bin/ls ${BINDIR} 2> /dev/null | \
+ egrep '^(i?tclsh[0-9]+\.[0-9]+(\_r)?([a-z][a-z])?)|otclsh$')
+
+if [ "$tclshs" = "" -a -f ${TCLSH} ] && \
+ (head -3 ${TCLSH} | grep awieYJFnsuILOnfsYEW) > /dev/null 2>&1
+then
+ rm -f ${PKG_PREFIX}/bin/tclsh
+fi