3007
|
1 |
#!/bin/bash
|
2297
|
2 |
#
|
2311
|
3 |
# $Id$
|
9788
|
4 |
# Author: Markus Wenzel, TU Muenchen
|
|
5 |
# License: GPL (GNU GENERAL PUBLIC LICENSE)
|
2311
|
6 |
#
|
2784
|
7 |
# DESCRIPTION: install the isabelle fonts into your X11 server
|
2311
|
8 |
|
2297
|
9 |
|
9788
|
10 |
PRG=$(basename "$0")
|
2297
|
11 |
|
|
12 |
function usage()
|
|
13 |
{
|
|
14 |
echo
|
|
15 |
echo "Usage: $PRG"
|
|
16 |
echo
|
2784
|
17 |
echo " Install the isabelle fonts into your X11 server."
|
3253
|
18 |
echo " (May be safely called repeatedly.)"
|
2297
|
19 |
echo
|
|
20 |
exit 1
|
|
21 |
}
|
|
22 |
|
|
23 |
|
2578
|
24 |
## check for isabelle fonts
|
|
25 |
|
|
26 |
function checkfonts()
|
|
27 |
{
|
2784
|
28 |
RESULT=$(xlsfonts -fn "-isabelle-fixed-*-isabelle-0" 2>&1) || return 1
|
2578
|
29 |
|
|
30 |
case "$RESULT" in
|
|
31 |
xlsfonts:*)
|
|
32 |
return 1
|
|
33 |
;;
|
|
34 |
esac
|
|
35 |
|
|
36 |
return 0
|
|
37 |
}
|
|
38 |
|
|
39 |
|
2297
|
40 |
## main
|
|
41 |
|
9788
|
42 |
[ "$#" -ne 0 ] && usage
|
2297
|
43 |
|
2578
|
44 |
checkfonts || eval $ISABELLE_INSTALLFONTS
|
|
45 |
checkfonts || echo "WARNING: Isabelle fonts probably not installed correctly!" >&2
|