lib/Tools/installfonts
author wenzelm
Mon, 11 Sep 2000 20:41:44 +0200
changeset 9927 7a9652294fe0
parent 9788 df671fa2562a
child 9974 5361a27c1853
permissions -rwxr-xr-x
tuned;

#!/bin/bash
#
# $Id$
# Author: Markus Wenzel, TU Muenchen
# License: GPL (GNU GENERAL PUBLIC LICENSE)
#
# DESCRIPTION: install the isabelle fonts into your X11 server


PRG=$(basename "$0")

function usage()
{
  echo
  echo "Usage: $PRG"
  echo
  echo "  Install the isabelle fonts into your X11 server."
  echo "  (May be safely called repeatedly.)"
  echo
  exit 1
}


## check for isabelle fonts

function checkfonts()
{
  RESULT=$(xlsfonts -fn "-isabelle-fixed-*-isabelle-0" 2>&1) || return 1

  case "$RESULT" in
    xlsfonts:*)
      return 1
      ;;
  esac

  return 0
}


## main

[ "$#" -ne 0 ] && usage

checkfonts || eval $ISABELLE_INSTALLFONTS
checkfonts || echo "WARNING: Isabelle fonts probably not installed correctly!" >&2