#!/usr/bin/perl -- # -*- perl -*- @figs = glob '*.fig'; $| = 1; foreach $file (@figs) { open(FILE, "<$file") or next; $first = ; @stats = stat FILE; close FILE; # delete the next line if your fig2dev can update xfig 3.2 files next if $first =~ /3\.2/; ($epsname = $file) =~ s/fig$/eps/; if( ! -f $epsname || (stat($epsname))[9] < $stats[9]) { print "Updating $file..."; if(system("fig2dev -L ps $file $epsname") == 0) { print "done.\n"; } else { print "Error updating $file: $?"; } } }