Last active
October 18, 2015 00:18
-
-
Save xorenio/fbe2fadd347909c5e7ec to your computer and use it in GitHub Desktop.
Quick light bash script for installing laravel
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 | |
# Get current dir | |
DIR=$(pwd) | |
# echo it out to make sure user is in the right place | |
echo $DIR | |
# What do you want to install 4.2 or latest | |
read -p "Laravel? 4.2 or Latest ? (1/2) " -n 1 -r && echo "" | |
if [[ $REPLY =~ ^[1]$ || ! $REPLY ]]; then | |
php /bin/composer.phar create-project laravel/laravel $DIR 4.2 --prefer-dist | |
elif [[ $REPLY =~ ^[2]$ || ! $REPLY ]]; then | |
php /bin/composer.phar create-project laravel/laravel $DIR --prefer-dist | |
fi | |
# Finished | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment