Debian Codegraph @

debian/create-font-links

raw
1 #!/bin/bash
2 #
3 # debian/create-fontlinks
4 #
5 # (c) 2012 Norbert Preining
6 # Licensed under GPLv2 or higher
7 #
8 # create links for fonts dirs listed in debian/$package.type1-fontdirs
9
10 pkg="$1"
11
12 do_one() {
13 f=$1
14 a=$(echo $f | sed -e 's!/type1/!/afm/!' -e 's!\.pfb$!.afm!')
15 if [ -e $f -a -e $a ] ; then
16 ff=$(echo $f | sed -e "s:^debian/$pkg/::")
17 aa=$(echo $a | sed -e "s:^debian/$pkg/::")
18 bn=$(basename $f .pfb)
19 echo $ff usr/share/fonts/type1/$pkg/$bn.pfb
20 echo $aa usr/share/fonts/type1/$pkg/$bn.afm
21 fi
22 }
23
24 if [ -r debian/$pkg.type1-fontdirs ] ; then
25 for d in $(cat debian/$pkg.type1-fontdirs) ; do
26 if [ -d $d ] ; then
27 for f in $(find debian/$pkg/usr/share/texlive/$d -type f -a -name \*.pfb) ; do
28 do_one $f
29 done
30 else
31 do_one debian/$pkg/usr/share/texlive/$d
32 fi
33 done
34 fi
35