This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
slim/bin/install.bash
2023-02-21 00:27:50 -08:00

58 lines
1.6 KiB
Bash

#!/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'