📄 setup
字号:
#!/bin/sh
#
# Copyright 1994-1996 Wind River Systems, Inc.
#
# modification history
# --------------------
# 01j,13jun96,pn started using standard TCL/TK shell, cleanup.
# 01i,04mar96,pn allowed patch CD to contain no TCL interpreter.
# 01h,24feb96,pn fixed the broken pipe problem on hpux machine.
# 01g,18dec96,pn change location of "TCL" to "RESOURCE/TCL" on CD
# 01f,05nov96,pn added support for AIX host.
# 01e,21oct96,pn added -L for installing license manager.
# 01d,30aug96,pn invoked correct tcl file base on install mode.
# 01c,29aug96,pn changed to use tcl7.5 and tk4.1.
# 01b,09aug96,pn Use uppercase for file and directory name.
# 01a,12jul96,jc Written.
#
##############################################################################
# Initialize
#
INST_TYPE="Software"
INST_MODE=gui
usage="Usage: $0 [-L[icense]] [-T[ext]]"
##############################################################################
# parsing the arguments
#
for arg in $@
do
if [ "$arg" = "-T" -o "$arg" = "-Text" ]; then
INST_MODE=text
elif [ "$arg" = "-L" -o "$arg" = "-License" ]; then
INST_TYPE=license
else
echo "$usage"
exit 0
fi
done
##############################################################################
# check for valid display
#
if [ "$DISPLAY" = "" -a "$INST_MODE" = "gui" ]; then
echo ""
echo "Warning: The DISPLAY environment variable is not set."
echo " Please set it, and re-run $0."
echo ""
echo "$usage"
exit
fi
##############################################################################
# obtains the CD root directory
#
CD_ROOT=`dirname $0`
cd $CD_ROOT
CD_ROOT=`pwd`
##############################################################################
# determents host type
#
case `/bin/uname -srvm` in
SunOS\ 5.*\ sun4*)
CD_BIN=$CD_ROOT/SUN4/SOLARIS2
WIND_HOST_TYPE=sun4-solaris2
;;
SunOS\ 4.*\ sun4*)
CD_BIN=$CD_ROOT/SUN4/SUNOS4
WIND_HOST_TYPE=sun4-sunos4
;;
HP-UX\ ?.09.*\ 9000/*)
CD_BIN=$CD_ROOT/PARISC/HPUX9
WIND_HOST_TYPE=parisc-hpux9
;;
HP-UX\ ?.10.*\ 9000/*)
CD_BIN=$CD_ROOT/PARISC/HPUX9
WIND_HOST_TYPE=parisc-hpux10
;;
AIX\ ?\ 4\ *)
CD_BIN=$CD_ROOT/RS6000/AIX4
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 installation."
exit 0
;;
esac
##############################################################################
# determents which tclsh/wish to be used for starting the setup
#
TRY1_TEXT=$CD_BIN/INSTTCL2
TRY2_TEXT=$WIND_BASE/host/$WIND_HOST_TYPE/bin/INSTTCL2
TRY3_TEXT=$WIND_BASE/host/$WIND_HOST_TYPE/bin/wtxtcl
TRY1_GUI=$CD_BIN/INSTTK2
TRY2_GUI=$WIND_BASE/host/$WIND_HOST_TYPE/bin/INSTTK2
TRY3_GUI=$WIND_BASE/host/$WIND_HOST_TYPE/bin/wtxwish
if [ "$INST_MODE" = "text" ]; then
if [ -f "$TRY1_TEXT" ]; then
INSTALL=$TRY1_TEXT
elif [ -f "$TRY2_TEXT" ]; then
INSTALL=$TRY2_TEXT
elif [ -f "$TRY3_TEXT" ]; then
INSTALL=$TRY3_TEXT
else
echo "${TRY1_TEXT}: not found"
echo "${TRY2_TEXT}: not found"
echo "${TRY3_TEXT}: not found"
echo "WIND_BASE=$WIND_BASE"
exit 1
fi
TCL_FILE=$CD_ROOT/RESOURCE/TCL/INSTTEXT.TCL
else
if [ -f "$TRY1_GUI" ]; then
INSTALL=$TRY1_GUI
elif [ -f "$TRY2_GUI" ]; then
INSTALL=$TRY2_GUI
elif [ -f "$TRY3_GUI" ]; then
INSTALL=$TRY3_GUI
else
echo "${TRY1_GUI}: not found"
echo "${TRY2_GUI}: not found"
echo "${TRY3_GUI}: not found"
echo "WIND_BASE=$WIND_BASE"
exit 1
fi
TCL_FILE=$CD_ROOT/RESOURCE/TCL/INSTTK.TCL
fi
##############################################################################
# creats temporary directory, and remove them when setup exit.
#
if [ "$TMPDIR" != "" ]; then
TMP=$TMPDIR/Inst$$
elif [ "$TMP" != "" ]; then
TMP=$TMP/Inst$$
else
TMP=/tmp/Inst$$
fi
mkdir -p $TMP || mkdir $TMP || exit 0
##############################################################################
# untar the tcl/tk libraries
#
(cd $TMP; tar xf $CD_ROOT/RESOURCE/TCL/LIB/TKLIB.TAR)
##############################################################################
# setup the environment variables needed for starting the SETUP
#
trap 'rm -rf $TMP' 0 1 15
trap "" 2
PATH=${CD_BIN}:$WIND_BASE/host/$WIND_HOST_TYPE/bin:$PATH
TCL_LIBRARY=$TMP/lib/tcl
TK_LIBRARY=$TMP/lib/tk
export TCL_LIBRARY
export TK_LIBRARY
export WIND_HOST_TYPE
export PATH
export CD_ROOT
export CD_BIN
export TMP
$INSTALL $TCL_FILE $INST_TYPE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -