source: trunk/biblehal/biblehal-clean @ 300

Last change on this file since 300 was 8, checked in by g7moreau, 13 years ago
  • Move biblehal folder in subfolder of trakata
  • Property svn:executable set to *
File size: 530 bytes
Line 
1#!/bin/bash
2#
3# gabriel 2010/06/03
4
5export PATH="/bin:/usr/bin:/usr/lib/biblehal"
6
7
8bibfile=$1; shift
9
10search=$(basename ${bibfile} .bib | cut -f 2-10 -d '-')
11
12CONFIG_FILE=/srv/refbase/initialize/db.inc.php
13
14CONNECT_NAME=$(grep '$username =' ${CONFIG_FILE} | cut -f 2 -d '"')
15CONNECT_PASS=$(grep '$password =' ${CONFIG_FILE} | cut -f 2 -d '"')
16
17cat <<END_SQL | mysql --user=${CONNECT_NAME} --password=${CONNECT_PASS}
18DELETE FROM refbaselegi.refs WHERE url RLIKE '/$search/';
19quit
20END_SQL
21
22rm /var/cache/biblehal/upload/${bibfile}
Note: See TracBrowser for help on using the repository browser.