From 6379d8df6c72501405d5961fdc6dc4ea55ca28d2 Mon Sep 17 00:00:00 2001 From: Thomas Metois Date: Fri, 17 Mar 2017 11:45:46 +0100 Subject: [PATCH] EVO: script update-all > missing fct --- scripts/update-all.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/update-all.sh b/scripts/update-all.sh index d5ba36f..ac96f50 100755 --- a/scripts/update-all.sh +++ b/scripts/update-all.sh @@ -30,6 +30,18 @@ pull_if_exists() { fi } +migrate_module() { + if [[ -d $2 ]]; then + $1 ./vendor/robmorgan/phinx/bin/phinx migrate -c ./$2/migrations/phinx.php + if [[ -d "${2}/hooks" && -f "${2}/.git/hooks/pre-commit.sh" ]]; then + cd $2/.git/hooks + ln -s ../../hooks/pre-commit.sh pre-commit 2>/dev/null + chmod u+x pre-commit + cd $2 + fi + fi +} + if [[ ! -f "config/autoload/local.php" ]]; then echo "Configure Monarc (config/autoload/local.php)" exit 1