From f7f9d969de8f339866ffa2abf512c56879684955 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 3 Mar 2016 22:18:17 -0500 Subject: [PATCH] Only take artisan down and bring it back up at the beginning and end of the init.sh script if the vendor folder exists --- init.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/init.sh b/init.sh index 9057950..54695cb 100755 --- a/init.sh +++ b/init.sh @@ -50,8 +50,11 @@ trap 'error "script killed"' SIGINT SIGQUIT exit } -msg "Running: ${c_m}php artisan down" -php artisan down +[[ -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" -msg "Running: ${c_m}php artisan up" -php artisan up +(( artisan_down )) && { + msg "Running: ${c_m}php artisan up" + php artisan up +} +