if    [  -e  ${INSTALL_ROOT}/etc/httpd/httpd.conf   ];  then
  SPELL_ROOT=`grep  '^DocumentRoot'  ${INSTALL_ROOT}/etc/httpd/httpd.conf   |  cut  -d\"  -f2`
elif  [  -e  ${INSTALL_ROOT}/etc/httpsd/httpd.conf  ];  then
  SPELL_ROOT=`grep  '^DocumentRoot'  ${INSTALL_ROOT}/etc/httpsd/httpd.conf  |  cut  -d\"  -f2`
fi                                                                       &&

if  [  "${SPELL_ROOT}"  ==  ""  ];  then
  SPELL_ROOT=/usr/share
fi                                                                       &&

cd  ${SOURCE_DIRECTORY}                                                  &&
mkdir  -p  ${INSTALL_ROOT}${SPELL_ROOT}/${SPELL}                         &&
cp  -r  *  ${INSTALL_ROOT}${SPELL_ROOT}/${SPELL}/                        &&
if [ -e /tmp/database.ini ]; then            
	cp  -v  /tmp/database.ini ${INSTALL_ROOT}${SPELL_ROOT}/${SPELL}/    
	echo "A previous database.ini copied from /tmp back into new installation."
fi									 &&

echo  "${SPELL} was installed in ${INSTALL_ROOT}${SPELL_ROOT}/${SPELL}"

