#!/bin/bash # check that $1 folder does not exit [ -d "$1" ] && echo "Folder $1 already exists" && exit 1 echo "*** Starting New Laravel Project ***" ################################################################################ # Check composer installed ################################################################################ composer -v > /dev/null 2>&1 COMPOSER=$? if [[ $COMPOSER -ne 0 ]]; then echo 'Composer is not installed' echo 'Checkout how to Install Composer here: https://www.nickyeoman.com/blog/php/install-composer-on-ubuntu/' echo 'Once installed, try running this script again' exit 1 else composer create-project laravel/laravel $1 fi cd $1 # Not running rootless, in development mode: chmod -R 777 storage/ ################################################################################ # Create directories ################################################################################ mkdir sass mkdir -p public/css ################################################################################ # Composer ################################################################################ ################################################################################ # Git ################################################################################ git init echo '.sass-cache/' >> .gitignore git add . git commit -m"First Commit, slim installed" ################################################################################ # Clean up ################################################################################ echo '***********************************' echo '' echo 'done'