#!/bin/bash

######################################################
# This script builds the directory 
#
#	source/TeXfonts/fonts
#
# which contains symbolic links to pfb files for fonts in TeX Live.
#
# First insure that the current TeX Live is the active distribution.
# Then run this script.
#
######################################################

# We're going to run this in the MacTeX/Ghostscript working directory...
WORK=`pwd`

# echo "Removing old file tree at ${WORK}/source/TeXfonts/fonts"
rm -rf ${WORK}/source/TeXfonts/fonts

mkdir -p ${WORK}/source/TeXfonts/fonts
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/amsfonts/cm/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/amsfonts/latxfont/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/amsfonts/cmextra/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/amsfonts/cyrillic/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/amsfonts/euler/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/amsfonts/symbols/*.pfb ${WORK}/source/TeXfonts/fonts/

ln -s /Library/TeX/Root/texmf-dist/fonts/type1/hoekwater/context/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/hoekwater/mflogo/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/hoekwater/manfnt/*.pfb ${WORK}/source/TeXfonts/fonts/

ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/rsfs/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/stmaryrd/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/tipa/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/wasy/*.pfb ${WORK}/source/TeXfonts/fonts/

ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/belleek/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/cmcyr/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/cs/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/marvosym/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/omega/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/pl/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/pxfonts/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/txfonts/*.pfb ${WORK}/source/TeXfonts/fonts/
ln -s /Library/TeX/Root/texmf-dist/fonts/type1/public/xypic/*.pfb ${WORK}/source/TeXfonts/fonts/


