Skip to content

Instantly share code, notes, and snippets.

@xorenio
Last active October 18, 2015 00:18
Show Gist options
  • Save xorenio/fbe2fadd347909c5e7ec to your computer and use it in GitHub Desktop.
Save xorenio/fbe2fadd347909c5e7ec to your computer and use it in GitHub Desktop.
Quick light bash script for installing laravel
#!/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