From: Florent Bruneau Date: Mon, 21 Jun 2010 14:43:30 +0000 (+0200) Subject: Add mysql_exec_nodb and mysql_pipe_nodb to pervasive.sh. X-Git-Tag: xorg/1.0.0~113 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=284f03bf92450e0e8c9315594329a8536ed05175;p=platal.git Add mysql_exec_nodb and mysql_pipe_nodb to pervasive.sh. Signed-off-by: Florent Bruneau --- diff --git a/upgrade/inc/pervasive.sh b/upgrade/inc/pervasive.sh index 94cb23b..046d5ab 100755 --- a/upgrade/inc/pervasive.sh +++ b/upgrade/inc/pervasive.sh @@ -46,6 +46,18 @@ function mysql_exec() { echo "OK" } +function mysql_pipe_nodb() { + sed -e "s/#\([0-9a-z]*\)#/${DBPREFIX}\1/g" | $MYSQL +} + +function mysql_exec_nodb() { + echo -n " * executing $1 " + if [[ -z "${DRY_RUN}" ]]; then + (echo $1 | mysql_pipe_nodb) || die "ERROR" + fi + echo "OK" +} + function mysql_run() { echo -n " * running $1 " if [[ -z "${DRY_RUN}" ]]; then