Ensure Prezto submodule is initialized on clone/install
install.sh: use --recurse-submodules on the initial clone, and always run 'git submodule update --init --recursive' before rake install so a fresh checkout doesn't leave zsh/prezto empty. README: document --recurse-submodules for manual clones; mention the recovery command for existing shallow clones. Fixes: bad math expression errors and 'no such file or directory: ~/.zprezto/runcoms/zshrc' on fresh shell startup when the Prezto submodule hadn't been initialized.
This commit is contained in:
@@ -62,11 +62,17 @@ elif [ -d "$YADR_DIR" ]; then
|
||||
exit 1
|
||||
else
|
||||
log "Cloning drunkendotfiles"
|
||||
git clone --depth=1 "$REPO_URL" "$YADR_DIR"
|
||||
git clone --recurse-submodules "$REPO_URL" "$YADR_DIR"
|
||||
fi
|
||||
|
||||
cd "$YADR_DIR"
|
||||
|
||||
# 1a. Ensure submodules are initialized (Prezto lives in zsh/prezto as a
|
||||
# submodule — without it, ~/.zshrc fails with "no such file or directory:
|
||||
# ~/.zprezto/runcoms/zshrc"). Safe to run on fresh and existing clones alike.
|
||||
log "Ensuring submodules are initialized"
|
||||
git submodule update --init --recursive
|
||||
|
||||
# 2. Run YADR's native install (Vim plugins, prezto, etc.)
|
||||
if have rake; then
|
||||
log "Running YADR rake install"
|
||||
|
||||
Reference in New Issue
Block a user