/
roa/
roa/lib/boards/
roa/lib/config/
roa/lib/edits/
roa/lib/help/
roa/lib/misc/
roa/lib/plrobjs/
roa/lib/quests/
roa/lib/socials/
roa/lib/www/
roa/lib/www/LEDSign/
roa/lib/www/LEDSign/fonts/
roa/lib/www/LEDSign/scripts/
roa/src/s_inc/
roa/src/sclient/
roa/src/sclient/binary/
roa/src/sclient/text/
roa/src/util/
#!/bin/csh -f

# This is a cshell for an auto substituting routine using sed for
# this is hard coded for *.c files btw
# Author: James Rhone (though it ain't all that) :) 1/2/97

set list = `ls *.c`
set numfiles=${#list}
if (! -e ./sourceword || ! -e ./targetword) then
  echo "sourceword and targetword files must exist"
  exit 1
endif

set src=`cat sourceword`
set trg=`cat targetword`

echo "Using command sed s/$src/$trg/g "
echo "Substituting with ${numfiles} files."

@ sofar = 1
while ( $sofar <= $numfiles )
echo "$list[$sofar]"
  sed s/"$src"/"$trg"/g $list[$sofar] > $list[$sofar].tmp
  mv $list[$sofar].tmp $list[$sofar]
  echo -n "$list[$sofar] "
  @ sofar ++
end