mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 06:20:28 +00:00
34 lines
706 B
Plaintext
34 lines
706 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
LYXDIR=`pwd`
|
||
|
LYX_XFONTS=$LYXDIR/fonts
|
||
|
|
||
|
if [ ! -d $LYX_XFONTS ]; then
|
||
|
mkdir $LYX_XFONTS || exit
|
||
|
|
||
|
fi
|
||
|
|
||
|
rm -f $LYX_XFONTS/fonts.dir $LYX_XFONTS/fonts.scale
|
||
|
|
||
|
|
||
|
for file in `sed -e 's/^\(.*\.pf[ab]\) .*$/\1/' < fonts-xlfd`; do
|
||
|
filepath=`kpsewhich $file`
|
||
|
|
||
|
if [ $? -eq 0 ]; then
|
||
|
if [ ! -e $LYX_XFONTS/$file ]; then
|
||
|
|
||
|
ln -s $filepath $LYX_XFONTS/$file
|
||
|
fi
|
||
|
|
||
|
echo `grep -e $file fonts-xlfd` >> $LYX_XFONTS/fonts.scale
|
||
|
echo "$file found."
|
||
|
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
awk "/\.pf/ { nlines++ }\
|
||
|
END { print nlines }" < $LYX_XFONTS/fonts.scale > $LYX_XFONTS/fonts.dir
|
||
|
|
||
|
cat $LYX_XFONTS/fonts.scale >> $LYX_XFONTS/fonts.dir
|
||
|
cp $LYX_XFONTS/fonts.dir $LYX_XFONTS/fonts.scale
|