Skip to content

Commit

Permalink
Merge pull request #7 from bclarkx2/feature/repo-branch
Browse files Browse the repository at this point in the history
Checkout branch if specified
  • Loading branch information
bclarkx2 authored Jun 13, 2020
2 parents 6483254 + d24a4d2 commit 1152b64
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,17 @@ install_repos() {
continue
fi

## Check out desired branch
if [[ -v repo[branch ]]; then
run "cd ${target}; git checkout ${repo[branch]}"
fi

# Handle submodules
run "cd ${target}; git submodule update --init --recursive" ;
run "cd ${target}; git submodule foreach --recursive git checkout master"

# Execute any post-install script
if [[ -n "${repo[script]}" ]]; then
if [[ -v repo[script] ]]; then
run "( cd ${target} ; ${repo[script]} )"
fi
done
Expand Down

0 comments on commit 1152b64

Please sign in to comment.