diff --git a/scripts/update-all.sh b/scripts/update-all.sh index 90d8e27..d76b2f5 100755 --- a/scripts/update-all.sh +++ b/scripts/update-all.sh @@ -6,24 +6,27 @@ NC='\033[0m' # No Color bypass=0 forceClearCache=0 -while getopts "hbc" option +isDevEnv=0 +while getopts "hbcd" option do - case $option in - h) - echo -e "Update or install all Monarc modules, frontend views and migrate database." - echo -e "\t-b\tbypass migrate database" - echo -e "\t-c\tforce clear cache" - echo -e "\t-h\tdisplay this message" - exit 1 - ;; - b) - bypass=1 - echo "Migrate database don't execute !!!" - ;; - c) - forceClearCache=1 - ;; - esac + case $option in + h) + echo -e "Update or install all Monarc modules, frontend views and migrate database." + echo -e "\t-b\tbypass migrate database" + echo -e "\t-c\tforce clear cache" + echo -e "\t-h\tdisplay this message" + exit 1 + ;; + b) + bypass=1 + echo "Migrate database don't execute !!!" + ;; + c) + forceClearCache=1 + ;; + d) + isDevEnv=1 + esac done pull_if_exists() { @@ -57,7 +60,11 @@ if [[ $? -eq 1 ]]; then exit 1 fi -composer install -o --no-dev +if [[ $isDevEnv -eq 0 ]]; then + composer ins -o --no-dev +else + composer ins +fi pathCore="module/Monarc/Core" pathFO="module/Monarc/FrontOffice" diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index cafda51..3773c58 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -278,7 +278,7 @@ sudo usermod -aG vagrant www-data echo -e "\n--- Update the project… ---\n" sudo chown -R $USER:$(id -gn $USER) /home/vagrant/.config -./scripts/update-all.sh > /dev/null +./scripts/update-all.sh -d > /dev/null