#!/usr/bin/perl use English; use Getopt::Long; use File::Basename; use Cwd; require "famtool.perl"; $opt_debug=0; $result = GetOptions ( "debug!", "texmf=s", # the root of the TDS hierarchy "expert=s", # means this is to be set up as an expert set, suffix s "outdir=s", # [dir] specifies where the results are to go "tetex!", # use original teTeX kpse commands "verbose!", # be chatty ); if ($result eq 0 ) { die ("OPTION FAILURE"); } if ($opt_debug) { $opt_verbose=1;} &Setup(ptm); $ENV{TEXINPUTS}="$Inidir/finst:$Inidir/mathptm:$opt_texmf/fonts/afm//:"; $JOB="fontptcm"; print "Running fontinst TeX job\n" if $opt_verbose; system("initex fontptcm"); &buildfilelist; print "Installing dvips files in $Outdir/dvips\n" if $opt_verbose; &installDvips; print "Installing metric files in $Outdir/tfm and vf\n" if $opt_verbose; print "** Making virtual fonts with vptovf\n" if $opt_verbose; for (grep(/.*\.vpl/,@filenames)) { s/.vpl//; my $Basename=$_; processVPL($Basename); } &buildfilelist; killfiles('.*8r\.tfm') ; print "** Installing TFM files in $Outdir/tfm\n" if $opt_verbose; for (grep(/.*\.tfm/,@filenames)) { print "Installing $_ \n" if $opt_verbose; if (! -r "$Outdir/tfm/$_") { system("mv $_ $Outdir/tfm") ; } } print "** Installing VF files in $Outdir/vf\n" if $opt_verbose; for (grep(/.*\.vf/,@filenames)) { print "Installing $_ \n" if $opt_verbose; if (! -r "$Outdir/vf/$_") { system("mv $_ $Outdir/vf") ; } } print "Installing LaTeX files in $Outdir/tex\n" if $opt_verbose; for (grep(/.*\.fd/,@filenames)) { if (! -r "$Outdir/tex/$_") { system("cp $_ $Outdir/tex") ; } } chdir($Inidir); if ($opt_debug) { print "Working files are left in /tmp/Fam_$$\n"; } else { system("rm -rf /tmp/Fam_$$") } &remove_duplicates("$Outdir/dvips/ptm.map"); &remove_duplicates("$Outdir/dvips/config.ptm"); # this is a rogue file, a nolig raw tfm unlink "$Outdir/tfm/pzcmi8r.tfm"; print "Done\n" if $opt_verbose; #-------------------------------------------------------------------