#!/usr/bin/perl -w

# AUTHOR:		 Laszlo Szathmary, jabba.laci@gmail.com
# DESCRIPTION:  wrapper for epstopdf
# USAGE:        eps2pdf file.eps
# METHOD:       converts file.eps to file.pdf (and it also corrects the .eps file)

use strict;

my ($in, $out, $cmd);
my $tmp = "tmp19770209.tmp.eps";

(@ARGV > 0) || die("Usage: eps2pdf in.eps\n");
$in  = $ARGV[0];
$out = $in;
   $out =~ s#\.eps$#\.pdf#;

$cmd = "eps2eps $in $tmp";
#print $cmd,"\n";
system($cmd);

$cmd = "epstopdf $tmp -o=$out";
#print $cmd,"\n";
system($cmd);

unlink($tmp);
