Created
November 17, 2013 13:29
-
-
Save coderabbi/7513395 to your computer and use it in GitHub Desktop.
Git Post-Checkout Hook: Composer Install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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