head	1.1;
branch	1.1.1;
access;
symbols
	john2:1.1.1.1.0.8
	lapyu1:1.1.1.1.0.6
	john1:1.1.1.1
	lapyu-work:1.1.1.1.0.4
	john-work:1.1.1.1.0.2
	SIXALPHA:1.1.1.1
	TEXLIVE:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2000.10.03.04.02.54;	author plaice;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.10.03.04.02.54;	author plaice;	state Exp;
branches;
next	;


desc
@@



1.1
log
@Initial revision
@
text
@eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@@"}' && eval 'exec perl -S $0 $argv:q'
        if 0;

# recursively finds all your eps files.  Looks down \input{fname}.
# CAVEATS:
# 1) cannot handle \input{fname} or \includegraphics{fname} split over
# more than one line.
# 2) Must be run from same directory as the Latex file.
# 3) Does not look down $TEXINPUTS or anything fancy like that...
# 4) Does not handle \include (though I guess its trivial)
# 5) Assumes *all* your graphics inclusions are eps.  But don't
# fret, because if they are not epstopdf dies anyhow....

# EDIT these two lines for your system....

$Eps2PdfCom = "epstopdf";
$ThisFunCom = "e2pall";

$fname=$ARGV[0];

# check for a *.tex at the end...
if ($fname !~ /.tex$/){
    $fname = "$fname.tex";
}

open(TEXFILE,$fname) or die "Cannot open file $fname";
# print "Finding *.eps files in $fname\n";

while($line=<TEXFILE>){
    # truncate $line after % sign....
    $line=~s/%.*//;
    # check for /input....
    if ($line=~/input{(.*)}/){
        print `$ThisFunCom $1`;
    }
    if ($line=~/includegraphics.*{(.*)}/){
        # check that the eps version is newer than the pdf version....
        if ((-M "$1.pdf") >= (-M "$1.eps")){
            print "Constructing $1.pdf from $1.eps\n";
            print `$Eps2PdfCom $1.eps`;
        }
        elsif ((-M "$1.pdf")==""){
            print "Constructing \t $1.pdf from $1.eps\n";
            print `$Eps2PdfCom $1.eps`;
        }
        else{
            print "$1.pdf \t is up to date with $1.eps\n";
        }

    };
}
close(TEXFILE);
@


1.1.1.1
log
@sun2.dante.de download 2/10/2000 of TeXLive (Omega 1.11)
@
text
@@
