From 9841c026cfbf0115fecf3bae0721bb42a89dae6f Mon Sep 17 00:00:00 2001 From: Rezart Qelibari Date: Mon, 28 Feb 2022 07:53:38 +0200 Subject: [PATCH] Allow branch specification in bootstrap.sh --- bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index 20dce99..de56eb4 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -12,12 +12,14 @@ function ensureDocopts() { function cloneMacOSSystemRepo() { local repoUrl="${MACOS_SYSTEM_REPO_URL:-https://github.com/astzweig/macos-system.git}" git clone -q "${repoUrl}" . + [ -n "${MACOS_SYSTEM_REPO_BRANCH}" ] && git checkout ${MACOS_SYSTEM_REPO_BRANCH} 2> /dev/null || true } function cloneZSHLibRepo() { local zshlibRepoUrl="${ZSHLIB_REPO_URL:-https://github.com/astzweig/zshlib.git}" git config --file=.gitmodules submodule.zshlib.url "${zshlibRepoUrl}" git submodule -q sync + [ -n "${ZSHLIB_REPO_BRANCH}" ] && git submodule set-branch -b ${ZSHLIB_REPO_BRANCH} `git config --file=.gitmodules submodule.zshlib.path` 2> /dev/null || true git submodule -q update --init --recursive --remote }