Last active
August 29, 2015 14:22
-
-
Save CraZySacX/2bdff464e0e63ae6b01a to your computer and use it in GitHub Desktop.
post-checkout hook for updating multirust override on checkout based on branch name
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 | |
# Place this file in your <project>/.git/hooks directory. | |
# Note the name has to be post-checkout and the file should | |
# be executable. | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
case $BRANCH in | |
"master") | |
multirust remove-override | |
;; | |
"beta") | |
multirust override beta | |
;; | |
"stable") | |
multirust override stable | |
;; | |
* ) | |
echo "Branch not recognized, override not changed!" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment