aboutsummaryrefslogtreecommitdiff
path: root/template/INSTALL-garamond
diff options
context:
space:
mode:
Diffstat (limited to 'template/INSTALL-garamond')
-rwxr-xr-xtemplate/INSTALL-garamond65
1 files changed, 65 insertions, 0 deletions
diff --git a/template/INSTALL-garamond b/template/INSTALL-garamond
new file mode 100755
index 0000000..268619c
--- /dev/null
+++ b/template/INSTALL-garamond
@@ -0,0 +1,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