Allow different repo urls in bootstrap.sh for dev
Having to clone from github or a remote repository in general during development is a waste of bandwidth, time and does not work during development while a change is being tested and not yet commited or pushed. Now remote urls can be configured through two env variables: MACOS_SYSTEM_REPO_URL and ZSHLIB_REPO_URL.
This commit is contained in:
15
bootstrap.sh
15
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user