#!/bin/sh

# @(#) apply.sh 
# Craig A. Smith  2005-12-27

echo Begining execution:  `date`

# The find command searches a directory heirachy, working downward.
# In this case, it starts with "." so you need to "cd" into the directory
# where you want to start and call this script with
# the appropriate relative or absolute path.

for i in `find . -type f -name \*.htm\* -print  `
do
perl ~/scripts/fus/apply.pl $i > XXX
if diff XXX $i > /dev/null
then :  #exit status 0 - no differences - dont write the file
else mv XXX $i
fi
done


# need to copy new css and js directories
# as well as new imags into existing directory
# and home page to replace frameset
# and new sermons page (url never changes)

cp -R ~/scripts/fus/template/images/*  ~/fus/images/ 
cp -R ~/scripts/fus/template/css ~/fus 
cp -R ~/scripts/fus/template/js ~/fus 
cp -R ~/fus/home/openingpage.html ~/fus/index.html 
cp -R ~/scripts/fus/template/sermons.html ~/fus 


echo Execution complete: `date` 
