#!/bin/csh -bf # # gp.UpdateManual # W. Prescott 1996/01/26 # # This script automatically updates the gp.manual web page. # It was adapted from UpdateSeminarPage. # # The script reads the substance of the manual from # /goa/local/templates/gp.manual.template # and appends any files found in # /goa/local/gp_dir # # Modifications: # 1998/01/14 whp Change destination to ehzmenlo # Define paths # ------------ set manualTemplateSrc = "/goa/local/templates/gp.manual" set wwwTemplateSrc = "/goa/local/templates/www" set codeSrc = "/goa/local/gp_dir" set local = "/goa/local" set dst = "ehzmenlo.wr.usgs.gov" set dstdir = "/webd1/ncweb/research/deformation/gps/gpmanual" # Create environment # ------------------ mkdir gpmanual.$$ cd gpmanual.$$ # Build procedure list HTML # Add Procedure lists to end of manual # ------------------------------------ gp.UpdateManual.ProcList $codeSrc gp.manual.ProcList.html perl \ -e 'use gp_www;' \ -e '@Footer = &gp_www::CreateFooterHTML("/research/deformation/gps/gpmanual/index.html");' \ -e 'print @Footer;' \ > gp.manual.Footer.html cat \ $manualTemplateSrc/top.html \ $manualTemplateSrc/content.html \ gp.manual.ProcList.html \ $manualTemplateSrc/bottom.html \ gp.manual.Footer.html \ > index.html # Move files # ---------- set SaveDir = `pwd` tar cf gpmanual.tar index.html cd $local tar uf $SaveDir/gpmanual.tar gp_dir cd $SaveDir rcp gpmanual.tar "${dst}:${dstdir}" rsh $dst "(cd $dstdir; tar xf gpmanual.tar; rm gpmanual.tar)" cd .. # Report results # -------------- if ($status == 0) then echo "gp.UpdateManual: gp.manual has been updated" rm -r gpmanual.$$ else echo "gp.UpdateManual: Update failed" echo "gp.UpdateManual: (Probably due to bad quake connection)" exit 1; endif exit