-
Notifications
You must be signed in to change notification settings - Fork 16
/
configure
executable file
·74 lines (60 loc) · 987 Bytes
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/sh
###
## This script will try and find the best possible wish shell to use for
## Visual Tcl. Once found, it will write out a start-up script for starting
## vTcl.
###
##
## Try to find the best possible wish.
##
findwish( ) {
WISHES=" \
wish8.6 \
wish8.5 \
wish8.4 \
wish8.3 \
wish8.2 \
wish8.1 \
wish8.0 \
wishx \
expectk \
"
DIRS=" `echo $PATH | sed -e 's/:/ /g'` \
/usr/local/bin \
/usr/bin \
/bin \
/opt/local/bin \
/opt/bin \
/opt/tcltk/bin
"
for wish in $WISHES
do
for dir in $DIRS
do
if [ -x $dir/$wish ]; then
WISH=$dir/$wish
return 1
fi
done
done
return 0
}
findwish
echo
if [ -z "$WISH" ]; then
echo "Could not find a usable WISH shell"
else
echo "Using $WISH"
fi
echo
cd `dirname $0`
VTCL_HOME=`pwd`
cat > $VTCL_HOME/vtcl << EOF
#!/bin/sh
PATH_TO_WISH=$WISH
VTCL_HOME=/usr/local/vtcl-8.6
export PATH_TO_WISH
export VTCL_HOME
exec \${PATH_TO_WISH} \${VTCL_HOME}/vtcl.tcl \$*
EOF
chmod +x $VTCL_HOME/vtcl