Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save WISHPRO/549e1d0c91a9484cd1f6 to your computer and use it in GitHub Desktop.
Save WISHPRO/549e1d0c91a9484cd1f6 to your computer and use it in GitHub Desktop.
#!/bin/bash
myproject='myproject'
mywwwdir='public_html'
# initialize project
composer create-project laravel/laravel $myproject 4.2.*
cd $myproject
perl -pi -e "s|/public|/../${mywwwdir}|" bootstrap/paths.php
perl -pi -e "s|/bootstrap|/${myproject}/bootstrap|" public/index.php
# rename the public folder to match hosting providers web root
mv public $mywwwdir
# create a directory for everything except the public directory
mkdir $myproject
# move stuff to app dir
mv {app,bootstrap,vendor,artisan,composer.*,*.php,*.xml} $myproject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment