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