if  spell_ok  apache          ||
    spell_ok  apache-mod_ssl
then
  I_DIR=/usr/share/apache/htdocs/$SPELL
elif  spell_ok  apache2
then
  I_DIR=/usr/share/apache2/htdocs/$SPELL
fi  &&

install  -d  -m  755  $I_DIR                     &&
cp  -R  catalog/*  $I_DIR/                       &&
install  -d  -m  755  /usr/share/doc/$SPELL      &&
cp  tep_database-pr2.2-CVS.pdf                   \
    /usr/share/doc/$SPELL                        &&
install  -d  -m  755  /usr/share/$SPELL          &&
cp  -R  extras  /usr/share/$SPELL                &&
install  -d  -m  777  $I_DIR/oscommerce_data     &&
touch  $I_DIR/includes/configure.php             &&
touch  $I_DIR/admin/includes/configure.php       &&
chmod  777  $I_DIR/includes/configure.php        &&
chmod  777  $I_DIR/admin/includes/configure.php  &&

if  [  "$OSCOMMERCE_CREATEDB"  ==  "y"  ]
then
  mysqladmin  create  osCommerce                        &&
  mysql  osCommerce  <  catalog/install/oscommerce.sql  ||
  # 
  # Return true as this will fail if the database already exists
  #
  true
else
  message  "${MESSAGE_COLOR}You'll need to run http://[your site]/$SPELL/install to setup the database${DEFAULT_COLOR}"
fi
