uninst
来自「zinc6.0升级到zinc6.0.1的补丁」· 代码 · 共 163 行
TXT
163 行
#!/bin/sh## Copyright 1984-1996 Wind River Systems, Inc.## modification history# --------------------# 01g,13jun97,pdn started using standard TCL/TK shell, cleanup.# 01f,24feb96,pdn fixed the broken pipe problem on hpux machine.# 01e,18dec96,pdn change location of "TCL" to "RESOURCE/TCL" on CD# 01d,05nov96,pdn added support for AIX host. # 01c,25oct96,pdn exec a temporary script so all files can be removed. # 01b,18oct96,pdn allowed relative path to be used. # 01a,16oct96,pdn Written. ################################################################################ Initialize #WIND_BASE=$1UI=TKusage="Usage: $0 <Installed Directory>"############################################################################### checks for valid WIND_BASE#if [ "$WIND_BASE" = "" -o ! -d "$WIND_BASE" ]; then echo "$usage" exit 0else ROOT=`pwd` cd $WIND_BASE WIND_BASE=`pwd` cd $ROOT UNINST_HOME=$WIND_BASE/.wind/uninstfi############################################################################### obtains the host type#case `/bin/uname -srvm` in SunOS\ 5.*\ sun4*) WIND_HOST_TYPE=sun4-solaris2 ;; SunOS\ 4.*\ sun4*) WIND_HOST_TYPE=sun4-sunos4 ;; HP-UX\ ?.09.*\ 9000/*) WIND_HOST_TYPE=parisc-hpux9 ;; HP-UX\ ?.10.*\ 9000/*) WIND_HOST_TYPE=parisc-hpux10 ;; AIX\ ?\ 4\ *) WIND_HOST_TYPE=rs6000-aix4 ;; *) echo 1>&2 "### You are logging in to a platform whose type" echo 1>&2 "### is not supported by the Tornado product." echo 1>&2 "### Aborting uninstall." exit 0 ;;esac############################################################################### checks the DISPLAY environment variable.#if [ "$DISPLAY" = "" ]; then echo "" echo "Warning: The DISPLAY environment variable is not set." echo " Please set it, and re-run $0." echo "" exitelse BIN_DIR=$WIND_BASE/host/$WIND_HOST_TYPE/binfi############################################################################### Create temporary directory#if [ "$TMPDIR" != "" ]; then TMP=$TMPDIR/UnInst$$elif [ "$TMP" != "" ]; then TMP=$TMP/UnInst$$else TMP=/tmp/UnInst$$fimkdir -p $TMP || mkdir $TMP || exit 0############################################################################### copy the uninstall binaries to the temporary dir#TRY1=$BIN_DIR/INSTTK2TRY2=$BIN_DIR/wtxwishif [ -f "$TRY1" ]; then cp $TRY1 $TMP PROGRAM=$TMP/INSTTK2elif [ -f "$TRY2" ]; then cp $TRY2 $TMP PROGRAM=$TMP/wtxwishelse echo "${TRY1}: not found" echo "${TRY2}: not found" exit 1ficp $BIN_DIR/setuptcl.* $TMP############################################################################### untar the tcl/tk libraries#(cd $TMP; tar xf $UNINST_HOME/TKLIB.TAR)############################################################################### Create another script in TMP dir. We will launch this script # to do actual uninstall.#cat > $TMP/UNINST << EOFTCL_LIBRARY=$TMP/lib/tclTK_LIBRARY=$TMP/lib/tkWIND_HOST_TYPE=$WIND_HOST_TYPEUI=$UITMP=$TMPexport TCL_LIBRARYexport TK_LIBRARYexport WIND_HOST_TYPEexport UIexport TMP$PROGRAM $UNINST_HOME/UNINST.TCL $WIND_BASEsleep 5rm -rf $TMPEOFchmod 744 $TMP/UNINST############################################################################### starts the uninstall program in the background.#exec $TMP/UNINST &
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?