From 30191e8053fe41ac511fe6c0c1257970b4be6abc Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Tue, 7 Jan 2020 20:59:13 -0500 Subject: [PATCH] Replace --no-artisan with --no-db as artisan commands were still getting run and skipping the database stuff was the reason for that anyway --- init.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/init.sh b/init.sh index 5d73306..55edefd 100755 --- a/init.sh +++ b/init.sh @@ -4,7 +4,7 @@ deps=('bower' 'composer' 'egrep' 'npm' 'php' 'sed') # Default settings -no_artisan=0 +no_db=0 # Initialize variables artisan_down=0 @@ -55,11 +55,10 @@ done # Exit with an error on ctrl-c trap 'error "script killed"' SIGINT SIGQUIT -# Check for the --no-artisan argument and set a flag that prevents artisan commands from being run if present -[[ -n "$1" && "$1" = '--no-artisan' ]] \ - && no_artisan=1 +# Check for the --no-db argument and set a flag that prevents database operations if present +[[ -n "$1" && "$1" = '--no-db' ]] && no_db=1 -(( ! no_artisan )) && [[ -d vendor ]] && { +[[ -d vendor ]] && { artisan_down=1 msg "Running: ${c_m}php artisan down" php artisan down @@ -72,6 +71,7 @@ while read -r; do [[ "$REPLY" =~ ^APP_KEY=(.*)$ && -z "${BASH_REMATCH[1]}" ]] && { msg 'Generating Encryption Key' 'php artisan key:generate' php artisan key:generate + break } done < .env @@ -89,7 +89,7 @@ grep -qe '^CACHE_BUST=' .env || { msg "Updating ${c_y}CACHE_BUST$c_w variable" sed -i 's|^CACHE_BUST=.*|CACHE_BUST='"$(LC_CTYPE=C LANG=C tr -dc A-Za-z0-9