-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup-laravel.sh
executable file
·48 lines (41 loc) · 1.1 KB
/
setup-laravel.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
echo "Lets's Get Started"
# Create new laravel Project
echo -n "Create a new Laravel app? [yes|no] : "
read -e laravel
if [[ $laravel == "yes" ]]
then
echo -n "What is the name of the app? : "
read appname
laravel new $appname
cd $appname
mv .env.example .env
php artisan key:generate
php artisan app:name $appname
fi
echo -n "Will you be using elixer? [yes|no] : "
read -e elixer
if [[ $elixer == "yes" ]]
then
npm install
fi
echo -n "Need a Git Repository [yes|no] : "
read -e git
if [[ $git == 'yes' ]]
then
echo Initializing Git
git init
git add .
git commit -m "initial commit"
fi
echo -n "Add this Repo to Github? [yes|no]: "
read -e github
if [[ $github == 'yes' ]]
then
echo -n "What is your github username? "
read githubUsername
curl -u "$githubUsername" https://api.github.com/user/repos -d "{\"name\":\"$appname\"}"
git remote add origin git@github.com:$githubUsername/$appname.git
git push origin master
fi
echo "You're All Set, Now get coding!"