diff --git a/bootstrap.sh b/bootstrap.sh index e397897..c61a922 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,10 +1,23 @@ #!/usr/bin/env zsh +function cloneMacOSSystemRepo() { + local repoUrl="${MACOS_SYSTEM_REPO_URL:-https://github.com/astzweig/macos-system.git}" + git clone -q "${repoUrl}" . +} + +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 + git submodule -q update --init --recursive --remote +} + function main() { local tmddir="`mktemp -d -t 'macos-system'`" trap 'rm -fr -- "${tmpdir}"' EXIT pushd -q "${tmddir}" - git clone -q --recurse-submodules https://github.com/astzweig/macos-system.git . + cloneMacOSSystemRepo + cloneZSHLibRepo ./install.sh popd -q }