#!/bin/sh # # drft06rr_box - make a DRFT06RR box web page (drft06rr.box?.html) # # This script creates a drft06rr.box?.html file (? = A-G) pointed to by index.html # It doesn't care if any of the files and images it links to are not there yet. # # Paul Wessel, 13-NOV-2001 # H=drft06rr SMTLIS=drft06rr_smts.lis #--------------------------- mkdir -p $H cd $H mkdir -p boxes date=`date` # # Makes the html files for a single box box=$1 cat << EOF > boxes/$H.box$box.html Drift Expedition Leg 6: The Easter/Salas y Gomez/Nazca Survey Box $box

Drift Expedition Leg 6: The Easter/Salas y Gomez/Nazca Survey Box $box

Box map $box

Click the icons to select another file format for the box map above: PDF map EPS map JPEG map

EOF if [ -f ../$SMTLIS ]; then nsmts=`grep -v '^#' ../$SMTLIS | grep $box | wc -l` else nsmts=0 fi if [ $nsmts -gt 0 ]; then cat << EOF >> boxes/$H.box$box.html

Click below to select one of the $nsmts seamount target surveyed within box $box:

EOF cat << EOF > $$.awk BEGIN { n_out = 0 } { if (\$2 == "$box") { printf "\"Seamount\n", "$H", \$1, \$1, \$1 n_out++ } if (n_out == 10) { printf "
\n" n_out = 0 } } EOF grep -v '^#' ../$SMTLIS | awk -f $$.awk >> boxes/$H.box$box.html else echo "

No seamount targets surveyed within box $box.

" >> boxes/$H.box$box.html fi cat << EOF >> boxes/$H.box$box.html

DRFT06RR home Return to Drift Expedition Leg 6 home page


drft06rr_box $box: Page last updated $date by $USER. EOF rm -f $$.awk