From eab7ff26cf4736612140f79dc59b305466a55aa5 Mon Sep 17 00:00:00 2001 From: Simon Pettersson Date: Thu, 5 Oct 2017 19:51:39 +0200 Subject: [PATCH] Made installer install current branch and not master --- tools/install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index 94bd4070..d9d60630 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -61,7 +61,14 @@ main() { exit 1 fi fi - env git clone --depth=1 $(git remote get-url origin) $ZSH || { + + branch="$(env git symbolic-ref --short HEAD)" + if [[ "$?" != "0" ]] || [[ "$branch" == "" ]]; then + printf "Error: failed to get current git branch\n" + exit 1 + fi + + env git clone --depth=1 $(git remote get-url origin) -b "$branch" $ZSH || { printf "Error: git clone of oh-my-zsh repo failed\n" exit 1 }