Created
February 19, 2014 05:35
-
-
Save santiblanko/9086587 to your computer and use it in GitHub Desktop.
good garbage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Let's get started." | |
echo -n "What is the name of the database for this app? " | |
read -e DATABASE | |
echo Creating MySQL database | |
mysql -uroot -p -e "CREATE DATABASE $DATABASE" | |
echo Updating database configuration file | |
gsed -i "s/'database' => 'database'/'database' => '$DATABASE'/" app/config/database.php | |
gsed -i "s/'password' => ''/'password' => '1234'/" app/config/database.php | |
echo -n "Do you need a users table? [yes|no] " | |
read -e ANSWER | |
if [ $ANSWER = 'yes' ] | |
then | |
echo Creating users table migration | |
php artisan generate:migration create_users_table --fields="username:string:unique, email:string:unique, password:string" | |
echo Migrating the database | |
php artisan migrate | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment