Skip to content

Instantly share code, notes, and snippets.

@bgallagh3r
Created October 28, 2013 13:41
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save bgallagh3r/7196971 to your computer and use it in GitHub Desktop.
Save bgallagh3r/7196971 to your computer and use it in GitHub Desktop.
Make git run composer install/update after you push to remote server.
#!/bin/bash
DIR=$(git rev-parse --show-toplevel)
if [ -e "$DIR/composer.json" ]; then
if [ -d "$DIR/vendor" ]; then
composer.phar install
else
composer.phar update
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment