Skip to content

Instantly share code, notes, and snippets.

@jlaswell
Last active December 15, 2015 03:19
Show Gist options
  • Save jlaswell/5193315 to your computer and use it in GitHub Desktop.
Save jlaswell/5193315 to your computer and use it in GitHub Desktop.
Quick and dirty bash script for quick Laravel 4 install and update. Make sure you already have Composer and git ssh keys working. Both of these files go in /usr/local/bin
#!/bin/bash
message_prompt="Laravel 4 will be installed in the current directory.\nContinue?"
message_confirm="\nHere we go!"
message_deny="\nJust let me know when you're ready."
echo -e $message_prompt
read -p "" -n 1
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
echo -e $message_deny
exit 1
fi
echo -e $message_confirm
git clone [email protected]:laravel/laravel -b develop .
composer install
#!/bin/bash
message_prompt="Laravel 4 will update the current directory:"
message2_prompt="\nMake sure you are your root application folder.\nContinue?"
message_confirm="\nHere we go!"
message_deny="\nJust let me know when you're ready."
echo -e $message_prompt $PWD $message2_prompt
read -p "" -n 1
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
echo -e $message_deny
exit 1
fi
echo -e $message_confirm
composer update
git pull origin develop
@jcldavid
Copy link

Make it check for the composer or composer.phar command as well, and download it if it's not installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment