#!/bin/tcsh -f #(ie run the cshell on this but don't read the .cshrc) echo version = 2.03 of atp 2003 Nov 16 # 2003 Nov 16, 2.03: locking mechanism # 1997 Dec 1, 2.02: functional version # 1997 Mar 22, 1.00: probable origin # AT change of the paper.tex file, run LaTeX # Show the paper only if there are no (or >1) arguments # Dr. Thomas D. Schneider # National Cancer Institute # Laboratory of Experimental and Computational Biology # Frederick, Maryland 21702-1201 # toms@ncifcrf.gov # permanent email: toms@alum.mit.edu (use only if first address fails) # http://www.lecb.ncifcrf.gov/~toms/ set lockfile = LaTeX.lock if (-f $lockfile) then echo "The l script is already running in this directory\!" echo "If this is in error, remove the file $lockfile" echo "and l will proceed to run LaTeX." rm -i $lockfile if (-f $lockfile) then echo "Ok, atp is shutting down" exit endif endif if !($#argv == 1) then if !(-f paper.dvi) then #******************************************************************************** # cp ~/bin/nothing.dvi paper.dvi echo display message about the dvi file missing set err = `whoami`-paper set tmperr = /tmp/$err.tex echo "\documentstyle[12pt]{article}" > $tmperr echo "\begin{document}" >> $tmperr #echo "zzz" >> $tmperr echo "\pagestyle{empty}" >> $tmperr echo "\Huge \bf \noindent" >> $tmperr echo "This is the first time you ran atp," >> $tmperr echo "so there is no dvi file.\\" >> $tmperr echo "Run \LaTeX\ once to get your text.\\" >> $tmperr echo "You may want to restart atp to get">> $tmperr echo "the window to fit your paper size.">> $tmperr echo "\end{document}" >> $tmperr pushd /tmp latex $err.tex # echo $tmperr ========================= # echo $err ========================= rm -f $err.aux $err.log $err.tex popd # make this the new dvi file mv /tmp/$err.dvi paper.dvi beep #******************************************************************************** endif sss paper endif atc ~toms/script/atp.script