aboutsummaryrefslogtreecommitdiff
path: root/template/INSTALL-garamond
blob: 268619cbeb77f3ba626230fd05417721f672b26b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env bash

TEXMF=`kpsexpand -n latex '$TEXMFHOME'`
CURRENT=$PWD

GARAMONDX=YES
URWGARAMOND=YES
kpsewhich garamondx.sty || GARAMONDX=NO
kpsewhich ugmm8a.pfb    || URWGARAMOND=NO

FETCH=`which wget`
if [[ $? != 0 ]]
then FETCH=`which fetch`
  if [[ $? != 0 ]]
  then FETCH="`which curl` -O -L"
    if [[ $? != 0 ]]
    then exit 1
    fi
  fi
fi

if [[ $GARAMONDX = "NO" ]]
then
  TMP=`mktemp -d`
  cd $TMP                                           || exit 1
  $FETCH http://mirrors.ctan.org/fonts/garamondx.zip  || exit 1
  unzip garamondx.zip                               || exit 1
  cd garamondx                                      || exit 1
  mkdir -p        $TEXMF/fonts/afm/garamondx        || exit 1
  mv afm/*        $TEXMF/fonts/afm/garamondx        || exit 1
  mkdir -p        $TEXMF/doc/latex/garamondx        || exit 1
  mv doc/*        $TEXMF/doc/latex/garamondx        || exit 1
  mkdir -p        $TEXMF/fonts/enc/garamondx        || exit 1
  mv enc/*        $TEXMF/fonts/enc/garamondx        || exit 1
  mkdir -p        $TEXMF/fonts/map                  || exit 1
  mv map/zgm.map  $TEXMF/fonts/map/                 || exit 1
  mkdir -p        $TEXMF/tex/latex/garamondx        || exit 1
  mv tex/*        $TEXMF/tex/latex/garamondx        || exit 1
  mkdir -p        $TEXMF/fonts/tfm/garamondx        || exit 1
  mv tfm/*        $TEXMF/fonts/tfm/garamondx        || exit 1
  mkdir -p        $TEXMF/fonts/type1/garamondx      || exit 1
  mv type1/*      $TEXMF/fonts/type1/garamondx      || exit 1
  mkdir -p        $TEXMF/fonts/vf/garamondx         || exit 1
  mv vf/*         $TEXMF/fonts/vf/garamondx         || exit 1
  updmap --enable zgm.map                           || exit 1
  cd $CURRENT                                       || exit 1
  rm -r $TMP                                        || exit 1
fi

if [[ $URWGARAMOND = "NO" ]]
then
  TMP=`mktemp -d`
  cd $TMP                                             || exit 1
  $FETCH http://mirrors.ctan.org/fonts/urw/garamond.zip || exit 1
  unzip garamond.zip                                  || exit 1
  cd garamond                                         || exit 1
  mkdir -p  $TEXMF/fonts/afm/urw-garamond             || exit 1
  mv *.afm  $TEXMF/fonts/afm/urw-garamond             || exit 1
  mkdir -p  $TEXMF/fonts/type1/urw-garamond           || exit 1
  mv *.pfb  $TEXMF/fonts/type1/urw-garamond           || exit 1
  cd $CURRENT                                         || exit 1
  rm -r $TMP                                          || exit 1
fi

# vim: sw=2:sts=2:et:nu