#!/bin/csh -f alias promp 'echo' if (-f /usr/ucb/echo) alias promp '/usr/ucb/echo -n' if !($?L2HTOP) then echo "*** Name L2HTOP is not set" goto err endif which unzip if ($status) then echo "*** the Info-Zip unzip command is not in the path" goto err endif # check for presence of files if (-d $L2HTOP/l2hsup) goto l2h echo "*** You must still create folder $L2HTOP/l2hsup and put the files in it." goto err l2h: cd ${L2HTOP}/l2hsup if (-d unzip) goto unzip echo "*** You must still create folder $L2HTOP/l2hsup/unzip." goto err unzip: if (-f unzip/l2hins.zip) goto ins echo "*** file l2hins.zip is not in directory $L2HTOP/l2hsup/unzip" goto err ins: if (-f unzip/l2hsupux.zip) goto sup echo "*** file l2hsupux.zip is not in directory $L2HTOP/l2hsup/unzip" goto err sup: set missing if !(-f anytopnm) set missing="$missing anytopnm" if !(-f pamflip) set missing="$missing pamflip" if !(-f pbmmake) set missing="$missing pbmmake" if !(-f pnmcat) set missing="$missing pnmcat" if !(-f pnmcolormap) set missing="$missing pnmcolormap" if !(-f pnmcrop) set missing="$missing pnmcrop" if !(-f pnmfile) set missing="$missing pnmfile" if !(-f pnmflip) set missing="$missing pnmflip" if !(-f pnmremap) set missing="$missing pnmremap" if !(-f ppmtogif) set missing="$missing ppmtogif" if !(-f ppmtojpeg) set missing="$missing ppmtojpeg" if ("$missing" == ) goto coreok echo "*** The following essential files are not in $L2HTOP/l2hsup:" foreach f ($missing) echo " $f" end echo " They are vital to the core operation of LaTeX2HTML, and they should" echo " be in a safe location, or you will most likely find that LaTeX2HTML" echo " stops working at the next netpbm upgrade or any other system change." echo " You should exit now and copy those files to $L2HTOP/l2hsup." echo " " promp "Hit return to abort or enter 'ignore' to proceed anyway: " set ans="$<" if ($ans != ignore) goto err coreok: set missing if !(-f bmptoppm) set missing="$missing bmptoppm" if !(-f giftopnm) set missing="$missing giftopnm" if !(-f jpegtopnm) set missing="$missing jpegtopnm" if !(-f pnmtops) set missing="$missing pnmtops" if !(-f ppmtobmp) set missing="$missing ppmtobmp" if ("$missing" == ) goto convok echo "*** The following converters are not in $L2HTOP/l2hsup:" foreach f ($missing) echo " $f" end echo " This will cause some utilities not to work as described, such as" echo " bmptoeps, important for inclusion of graphics, and bmptogif and" echo " giftobmp. important for editing icons." echo " Move in the missing files or edit the utilities to set them up" echo " differently." echo " " promp "After reading the above message, hit return to continue: " set ans="$<" convok: set missing if !(-f pcxtoppm) set missing="$missing pcxtoppm" if !(-f picttoppm) set missing="$missing picttoppm" if !(-f pngtopnm) set missing="$missing pngtopnm" if !(-f pnmcut) set missing="$missing pnmcut" if !(-f pnmpad) set missing="$missing pnmpad" if !(-f pnmrotate) set missing="$missing pnmrotate" if !(-f pnmscale) set missing="$missing pnmscale" if !(-f pnmtopng) set missing="$missing pnmtopng" if !(-f sgitopnm) set missing="$missing sgitopnm" if !(-f tifftopnm) set missing="$missing tifftopnm" if !(-f xbmtopbm) set missing="$missing xbmtopbm" if !(-f xwdtopnm) set missing="$missing xwdtopnm" if ("$missing" == ) goto othrok echo "Note: The following NONessential utilities are not in $L2HTOP/l2hsup:" foreach f ($missing) echo " $f" end echo " " promp "After reading the above message, hit return to continue: " set ans="$<" othrok: # unzip l2hsupux unzip -o -qq unzip/l2hsupux if ($status) goto errsup if !(-f l2hmods/latex2html.pin) goto errsup if !(-f l2hmods/pstoimg.pin) goto errsup if !(-f l2hmods/texexpand.pin) goto errsup if !(-f l2hmods/prefs.pm) goto errsup if !(-f l2hmods/l2hconf.pin) goto errsup if !(-f l2hmods/config/config.pl) goto errsup goto havsup errsup: echo "*** unable to unzip l2hsupux for some reason" goto err havsup: # get files from l2hins cd $L2HTOP unzip -o -qq $L2HTOP/l2hsup/unzip/l2hins if !(-f l2hins/prefs.pm) goto errins cd l2hins if !(-f versions/html4_0.pl) goto errins goto havins errins: echo "*** Unable to create $L2HTOP/l2hins for some reason." goto err havins: # copy in the modified files if !(-f ../l2hsup/l2hmods/prefs.pm) then echo "*** files in l2hmods not found" goto err endif foreach f (`find ../l2hsup/l2hmods -type f`) set fout="`echo $f | sed 's@../l2hsup/l2hmods/@@'`" echo cp $f $fout if ("$f" == "$fout") then echo "*** unable to copy files as shown" goto errxc endif if !(-f $fout) then echo "*** The file to replace does not exist?? Please investigate" goto errxc endif cp $f $fout end set a > ./config.log if ($status) goto errxc set a > ./cfgcache.pm if ($status) goto errxc rm -r docs goto havxc errxc: echo "*** Unable to move the fixed up files to their destinations." goto err havxc: echo " " echo "Various files have been successfully moved to their correct" echo "directories. See the install web page for what to do next." goto end err: echo "*** Aborted." end: