X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=upgrade%2Finc%2Fpervasive.sh;h=046d5abdd5ef482adc4925380e16bc3d3cdaab3c;hb=284f03bf92450e0e8c9315594329a8536ed05175;hp=94cb23bbabc7440c9b45539e7a8fbbd04c7751b5;hpb=e3164bb10232603df9576e843a9a4e26020ade33;p=platal.git 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