Page MenuHomec4science

dbexec.in
No OneTemporary

File Metadata

Created
Sat, Jul 20, 06:40

dbexec.in

#!/bin/sh
## -*- mode: script; coding: utf-8; -*-
##
## $Id$
##
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## CDS Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with CDS Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
VERSION='$Id$'
MYSQL='@MYSQL@'
## DB config variables. These variables are to be set in invenio.conf
## by admins and then replaced in situ in this file by calling
## "inveniocfg --update-dbexec".
CFG_DATABASE_HOST='localhost'
CFG_DATABASE_NAME='cdsinvenio'
CFG_DATABASE_USER='cdsinvenio'
CFG_DATABASE_PASS='my123p$ss'
# is help called?
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo "Usage: $0"
echo "General options:"
echo " -h, --help Print this help."
echo " -V, --version Print version information."
exit 0
fi
# is version called?
if [ "$1" = "-V" ] || [ "$1" = "--version" ]; then
echo $VERSION
exit 0
fi
## okay, call MySQL client:
$MYSQL -B --host="$CFG_DATABASE_HOST" --user="$CFG_DATABASE_USER" --password="$CFG_DATABASE_PASS" $CFG_DATABASE_NAME

Event Timeline