From 0c3a6b53772e0737f03fe6fb911f098a0de1afd2 Mon Sep 17 00:00:00 2001 From: Thomas Metois Date: Fri, 17 Mar 2017 11:39:47 +0100 Subject: [PATCH] EVO: script client-upgrade-db > check good path between "module/" & "vendor/monarc/" --- scripts/client-upgrade-db.sh | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/scripts/client-upgrade-db.sh b/scripts/client-upgrade-db.sh index 88d46f4..bf9ccc7 100755 --- a/scripts/client-upgrade-db.sh +++ b/scripts/client-upgrade-db.sh @@ -9,12 +9,38 @@ SQLUSER=$3 SQLPASS=$4 SQLBASE=$5 +path="" +case $MODULE in + "MonarcCore"|"core") + path="module/MonarcCore" + if [ ! -d $pathCore ]; then + path="vendor/monarc/core" + fi + ;; + "MonarcFO"|"frontoffice") + path="module/MonarcFO" + if [ ! -d $pathCore ]; then + path="vendor/monarc/frontoffice" + fi + ;; + "MonarcBO"|"backoffice") + path="module/MonarcBO" + if [ ! -d $pathCore ]; then + path="vendor/monarc/backoffice" + fi + ;; + *) + echo "Unknow module" + exit 1 + ;; +esac + cat </tmp/conf.tmp.php array( - 'migrations' => 'vendor/monarc/$MODULE/migrations/db', - 'seeds' => 'vendor/monarc/$MODULE/migrations/seeds', + 'migrations' => '$path/migrations/db', + 'seeds' => '$path/migrations/seeds', ), 'environments' => array( 'default_migration_table' => 'phinxlog',