Skip to content

Instantly share code, notes, and snippets.

@paolooo
Last active December 15, 2015 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paolooo/5292362 to your computer and use it in GitHub Desktop.
Save paolooo/5292362 to your computer and use it in GitHub Desktop.
bash script to download and setup latest laravel
#!/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