Only take artisan down and bring it back up at the beginning and end of the init.sh script if the vendor folder exists

This commit is contained in:
Kevin MacMartin 2016-03-03 22:18:17 -05:00
parent 79203673e8
commit f7f9d969de

View file

@ -50,8 +50,11 @@ trap 'error "script killed"' SIGINT SIGQUIT
exit
}
[[ -d vendor ]] && {
artisan_down=1
msg "Running: ${c_m}php artisan down"
php artisan down
}
msg "Running: ${c_m}composer installl --no-dev"
composer install --no-interaction --no-dev || error "${c_m}composer install --no-interaction --no-dev$c_w exited with an error status"
@ -68,5 +71,8 @@ bower install || error "${c_m}bower install$c_w exited with an error status"
msg "Running: ${c_m}gulp --production"
gulp --production || error "${c_m}gulp --production$c_w exited with an error status"
(( artisan_down )) && {
msg "Running: ${c_m}php artisan up"
php artisan up
}