lib/Tools/installfonts
author wenzelm
Tue Apr 22 11:37:12 1997 +0200 (1997-04-22)
changeset 3007 e5efa177ee0c
parent 2784 a78655c814b0
child 3253 ea75747190a7
permissions -rwxr-xr-x
removed -norc;
wenzelm@3007
     1
#!/bin/bash
wenzelm@2297
     2
#
wenzelm@2311
     3
# $Id$
wenzelm@2311
     4
#
wenzelm@2784
     5
# DESCRIPTION: install the isabelle fonts into your X11 server
wenzelm@2311
     6
wenzelm@2297
     7
wenzelm@2297
     8
PRG=$(basename $0)
wenzelm@2297
     9
wenzelm@2297
    10
function usage()
wenzelm@2297
    11
{
wenzelm@2297
    12
  echo
wenzelm@2297
    13
  echo "Usage: $PRG"
wenzelm@2297
    14
  echo
wenzelm@2784
    15
  echo "  Install the isabelle fonts into your X11 server."
wenzelm@2297
    16
  echo "  (May be savely called repeatedly.)"
wenzelm@2297
    17
  echo
wenzelm@2297
    18
  exit 1
wenzelm@2297
    19
}
wenzelm@2297
    20
wenzelm@2297
    21
wenzelm@2578
    22
## check for isabelle fonts
wenzelm@2578
    23
wenzelm@2578
    24
function checkfonts()
wenzelm@2578
    25
{
wenzelm@2784
    26
  RESULT=$(xlsfonts -fn "-isabelle-fixed-*-isabelle-0" 2>&1) || return 1
wenzelm@2578
    27
wenzelm@2578
    28
  case "$RESULT" in
wenzelm@2578
    29
    xlsfonts:*)
wenzelm@2578
    30
      return 1
wenzelm@2578
    31
      ;;
wenzelm@2578
    32
  esac
wenzelm@2578
    33
wenzelm@2578
    34
  return 0
wenzelm@2578
    35
}
wenzelm@2578
    36
wenzelm@2578
    37
wenzelm@2297
    38
## main
wenzelm@2297
    39
wenzelm@2297
    40
[ $# -ne 0 ] && usage
wenzelm@2297
    41
wenzelm@2578
    42
checkfonts || eval $ISABELLE_INSTALLFONTS
wenzelm@2578
    43
checkfonts || echo "WARNING: Isabelle fonts probably not installed correctly!" >&2