Last active
December 15, 2015 16:49
-
-
Save paolooo/5292362 to your computer and use it in GitHub Desktop.
bash script to download and setup latest 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 | |
## Usage | |
## | |
## Bash script for latest laravel | |
## | |
## $ [bash_file] [directoy] | |
## $ ./bash_laravel www/laravel | |
## check for a directory | |
if test -z "$1"; then | |
echo 'Please provide a directory name' | |
else | |
## check if directory already exists | |
if [ -d $1 ]; then | |
echo 'The '"$1"' directory already exists' | |
else | |
echo 'by Nino Paolo' | |
echo '' | |
mkdir $1 | |
## move to directory | |
cd $1 | |
## Download laravel | |
echo '(1/3) Downloading Laravel...' | |
curl -s -L http://github.com/laravel/laravel/archive/develop.zip > develop.zip | |
## Unzip, move, and clean up laravel | |
echo '(2/3) Unzipping and cleaning up files...' | |
unzip -q develop.zip | |
rm develop.zip | |
cd laravel-develop | |
mv * .. | |
cd .. | |
rm -R laravel-develop | |
## Make the /storage directory writable | |
echo '(3/3) Making app/storage directory writable...' | |
chmod -R o+w app/storage | |
## Readme | |
echo '' | |
echo 'Official Documentation: http://laravel.com' | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment