#!/bin/bash
#
# gabriel 2010/04/02

export PATH="/bin:/usr/bin:/usr/lib/biblehal"


CONFIG_FILE=/srv/refbase/initialize/db.inc.php

CONNECT_NAME=$(grep '$username =' ${CONFIG_FILE} | cut -f 2 -d '"')
CONNECT_PASS=$(grep '$password =' ${CONFIG_FILE} | cut -f 2 -d '"')

cat <<END_SQL | mysql --user=${CONNECT_NAME} --password=${CONNECT_PASS}
DELETE FROM refbaselegi.refs;
quit
END_SQL


rm /var/cache/biblehal/upload/*.bib
