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