#!/bin/bash

cd `dirname $0`
BASE_DIR=`pwd`

DROP_SQL_FILE=/tmp/fess_db.sql.$$
echo "drop database fess_db;" >> $DROP_SQL_FILE
echo "drop database fess_robot;" >> $DROP_SQL_FILE
echo "FLUSH PRIVILEGES;" >> $DROP_SQL_FILE
echo "Dropping DB on MySQL..."
echo -n "MySQL(root): "
mysql -u root -p < $DROP_SQL_FILE
ret=`echo $?`
if [ $ret == 0 ] ; then 
    echo "Dropped."
fi
rm $DROP_SQL_FILE

