#!/usr/bin/perl

use warnings;

# perl script processes Feynman graphs of LaTeX package feynmf with metafont

# synopsis: makefeyn

chdir("feynmf");
open(SOURCE,"ls *.mp | grep -v -i 'feynmp.mp' |");
@sourcearray = <SOURCE>;
close(SOURCE);
foreach $actualfile (@sourcearray)
{
    chomp($actualfile);
    print "Processing feynman graph $actualfile ...\n";
    $prefixend=index($actualfile, ".");
    $prefix = substr($actualfile, 0, $prefixend);
    system("rm $prefix.1 $prefix.log $prefix.t1");
    system("mpost $prefix.mp");
}
