#!/usr/bin/perl -w
#
# search .PS and .ps files and converts them to *.png
#
use strict;
my $temp;
my @files = <*.PS>;
#
# rename *.PS to .ps
#
foreach my $file (@files)
{
$file =~ /(.*)(\.PS)/;
my $temp = "${1}.ps";
print " renaming $file to $temp \n";
system( "mv $file $temp");
}
#
# convert *.ps *.png
#
my @files = <*.ps>;
foreach my $file (@files)
{
$temp = $file;
print " converting $temp \n";
system( "ps2png.py $file");
}