2344
|
1 |
#!/bin/bash -norc
|
2300
|
2 |
#
|
2307
|
3 |
# $Id$
|
|
4 |
#
|
2300
|
5 |
# Isabelle within an xterm.
|
|
6 |
|
2623
|
7 |
# FIXME startup prefix (ISABELLE_COMMAND_LINE !?)
|
2300
|
8 |
|
|
9 |
## diagnostics
|
|
10 |
|
2623
|
11 |
PRG=$(basename $0)
|
|
12 |
|
|
13 |
function usage()
|
|
14 |
{
|
|
15 |
echo
|
|
16 |
echo "Usage: $PRG [OPTIONS] [--] [CMDLINE]"
|
|
17 |
echo
|
|
18 |
echo " Options are:"
|
|
19 |
echo " -g GEOM main window geometry (default 80x60)"
|
|
20 |
echo " -s BOOL symbolic font output? (default true)"
|
|
21 |
#FIXME
|
|
22 |
# echo " -r BOOL actually run isabelle? (default true)"
|
|
23 |
echo
|
|
24 |
echo " Starts Isabelle within an xterm window. CMDLINE is passed"
|
|
25 |
echo " directly to the isabelle session."
|
|
26 |
echo
|
|
27 |
exit 1
|
|
28 |
}
|
|
29 |
|
2300
|
30 |
function fail()
|
|
31 |
{
|
2344
|
32 |
echo "$1" >&2
|
2300
|
33 |
exit 2
|
|
34 |
}
|
|
35 |
|
|
36 |
|
2623
|
37 |
## process command line
|
|
38 |
|
|
39 |
# options
|
|
40 |
|
|
41 |
MAINGEOM="80x60"
|
|
42 |
SYMBOLS="true"
|
|
43 |
RUN="true"
|
|
44 |
|
|
45 |
while getopts "g:r:s:" OPT
|
|
46 |
do
|
|
47 |
case "$OPT" in
|
|
48 |
g)
|
|
49 |
MAINGEOM="$OPTARG"
|
|
50 |
;;
|
|
51 |
r)
|
|
52 |
RUN="$OPTARG"
|
|
53 |
;;
|
|
54 |
s)
|
|
55 |
SYMBOLS="$OPTARG"
|
|
56 |
;;
|
|
57 |
\?)
|
|
58 |
usage
|
|
59 |
;;
|
|
60 |
esac
|
|
61 |
done
|
|
62 |
|
|
63 |
shift $(($OPTIND - 1))
|
|
64 |
|
|
65 |
|
2300
|
66 |
## main
|
|
67 |
|
2623
|
68 |
if [ -z "$RUN" -o "$RUN" = false ]; then
|
|
69 |
RUN=""
|
|
70 |
else
|
|
71 |
RUN=true
|
|
72 |
fi
|
|
73 |
|
|
74 |
if [ -z "$SYMBOLS" -o "$SYMBOLS" = false ]; then
|
|
75 |
if [ -z "$RUN" ]; then
|
|
76 |
exec xterm -T Isabelle -n Isabelle -geometry "$MAINGEOM"
|
|
77 |
else
|
|
78 |
exec xterm -T Isabelle -n Isabelle -geometry "$MAINGEOM" -e $ISABELLE "$@"
|
|
79 |
fi
|
2300
|
80 |
else
|
2474
|
81 |
$ISATOOL installfonts
|
2623
|
82 |
if [ -z "$RUN" ]; then
|
|
83 |
exec xterm -T Isabelle -n Isabelle -geometry "$MAINGEOM" -fn isacr14 \
|
|
84 |
-xrm "*fontMenu.Label: Isabelle fonts" \
|
|
85 |
-xrm "*fontMenu*font1*Label: Large" \
|
|
86 |
-xrm "*VT100*font1: isacb24" \
|
|
87 |
-xrm "*fontMenu*font2*Label:" \
|
|
88 |
-xrm "*VT100*font2:" \
|
|
89 |
-xrm "*fontMenu*font3*Label:" \
|
|
90 |
-xrm "*VT100*font3:" \
|
|
91 |
-xrm "*fontMenu*font4*Label:" \
|
|
92 |
-xrm "*VT100*font4:" \
|
|
93 |
-xrm "*fontMenu*font5*Label:" \
|
|
94 |
-xrm "*VT100*font5:" \
|
|
95 |
-xrm "*fontMenu*font6*Label:" \
|
|
96 |
-xrm "*VT100*font6:"
|
|
97 |
else
|
|
98 |
exec xterm -T Isabelle -n Isabelle -geometry "$MAINGEOM" -fn isacr14 \
|
|
99 |
-xrm "*fontMenu.Label: Isabelle fonts" \
|
|
100 |
-xrm "*fontMenu*font1*Label: Large" \
|
|
101 |
-xrm "*VT100*font1: isacb24" \
|
|
102 |
-xrm "*fontMenu*font2*Label:" \
|
|
103 |
-xrm "*VT100*font2:" \
|
|
104 |
-xrm "*fontMenu*font3*Label:" \
|
|
105 |
-xrm "*VT100*font3:" \
|
|
106 |
-xrm "*fontMenu*font4*Label:" \
|
|
107 |
-xrm "*VT100*font4:" \
|
|
108 |
-xrm "*fontMenu*font5*Label:" \
|
|
109 |
-xrm "*VT100*font5:" \
|
|
110 |
-xrm "*fontMenu*font6*Label:" \
|
|
111 |
-xrm "*VT100*font6:" \
|
2702
|
112 |
-e $ISABELLE -m symbols "$@"
|
2623
|
113 |
fi
|
2300
|
114 |
fi
|