Permalink
Browse files

use BRANCH env var to checkout specific branch when installing

  • Loading branch information...
1 parent fa27d6a commit 13a2cd2ccabb1b59620eec91842ea506c8477a90 Joey Ekstrom committed with Jan 20, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 contrib/gitflow-installer.sh
@@ -60,6 +60,15 @@ case "$1" in
echo "Cloning repo from GitHub to $REPO_NAME"
git clone "$REPO_HOME" "$REPO_NAME"
fi
+
+ if [ -n "$BRANCH" ] ; then
+ echo "switching to branch $BRANCH"
+ lastcwd=$PWD
+ cd "$REPO_NAME"
+ git checkout "$BRANCH"
+ cd "$lastcwd"
+ fi
+
if [ -f "$REPO_NAME/$SUBMODULE_FILE" ] ; then
echo "Submodules look up to date"
else

0 comments on commit 13a2cd2

Please sign in to comment.