#! /bin/csh -f
#
set ppath = `echo $0 | sed -e 's/^\.\///'`
set prog = $ppath:t
if ($ppath != "bin/$prog") then
   echo You must run this script from the ivoaregistry home directory and 
   echo "  execute this script" as bin/$prog.
   exit 1;
endif

set subst = `echo $PWD | sed -e 's/\//\\\//g'`

foreach tool (src/scripts/regsearch*) 

   sed -e "s/@IVOAREG_HOME@/$subst/g" $tool >! bin/$tool:t

end
