2 # This helper rebuilds the fonts.dir and fonts.scale files in a
3 # directory specified by a template.
6 [ -z "$fonts_dir" ] && return 1
7 [ ! -d "$fonts_dir" ] && $mkdir_cmd -p $fonts_dir
9 mkfontdir_cmd
=$PKGFS_MASTERDIR/bin
/mkfontdir
10 mkfontscale_cmd
=$PKGFS_MASTERDIR/bin
/mkfontscale
12 if [ -x $mkfontdir_cmd -a -x $mkfontscale_cmd ]; then
13 save_path
=$
(pwd -P 2>/dev
/null
)
14 cd $fonts_dir && $mkfontdir_cmd && $mkfontscale_cmd
15 if [ "$?" -eq 0 ]; then
16 echo "=> Updated $fonts_dir/fonts.dir."
17 echo "=> Updated $fonts_dir/fonts.scale."