Skip to content

Instantly share code, notes, and snippets.

@coderabbi
Created November 17, 2013 13:29
Show Gist options
  • Save coderabbi/7513395 to your computer and use it in GitHub Desktop.
Save coderabbi/7513395 to your computer and use it in GitHub Desktop.
Git Post-Checkout Hook: Composer Install
#!/bin/bash
#
# Allows us to read user input below, assigns stdin to keyboard
exec < /dev/tty
while true; do
read -p "Run Composer install? [Y/n]: " yn
case $yn in
[Yy]* ) composer install;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment