#!/bin/sh 

source $base/p1/comsci/sh/chel.sh


# Create a table of *.sh files in the workspace, 
#   relative to the current directory.
function find_sh_files
{
  pushd $base > /tmp/temp.dat;
  echo \<table\>
  local i;
  for i in `find . -name \*.sh`; do
    declare t1=${i#./*};
    echo \<tr\> \<td\> \<a class=\"reflocal\" href=\"\.\.\/\.\.\/\.\.\/${t1}\"\> ${t1%*.txt} \<\/a\> \<\/td\> \<\/tr\>;
  done;
  echo \<\/table\>
  popd > /tmp/temp.dat;
}


function insert_sh_table
{
  find_sh_files > /tmp/tempscriptrefs.txt
  sed '/UPDATE_FRED/r /tmp/tempscriptrefs.txt' doc02master.html >doc02.html
}

insert_sh_table


