#!/usr/bin/perl

my $tag = $ARGV[0];
die "No tag" if $tag =~ /^\s*$/;

my $footer = "info/footer/work.fot";
die "No footer" if !-r $footer;


my $PDFopts = "-sPAPERSIZE=letter -dCompatibilityLevel=1.4 ";
$PDFopts .= "-dPDFSETTINGS=/prepress";

my $mpgdata;
if (-d "editions/temp11") {
   $mpgdata = " editions/temp11/score/*.mpg";
} elsif (-d "editions/temp10") {
   $mpgdata = " editions/temp10/score/*.mpg";
} elsif (-d "editions/temp10") {
   $mpgdata = " editions/temp09/score/*.mpg";
}

print "$tag:DATA = $mpgdata\n";

`../mpg2ps $mpgdata | musefoot -f $footer | ps2pdf $PDFopts - - > $tag.pdf`;


