mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:00:04 +08:00
perf(install): clone repo with --depth 1
This commit is contained in:
parent
2fea2697e6
commit
78ce96478d
@ -82,7 +82,7 @@ echo ""
|
||||
|
||||
if (!(Test-Path "$HOME\.SpaceVim")) {
|
||||
echo "==> 正在安装 $app_name"
|
||||
git clone $repo_url $repo_path
|
||||
git clone --depth 1 $repo_url $repo_path
|
||||
} else {
|
||||
echo "==> 正在更新 $app_name"
|
||||
Push-Location $repo_path
|
||||
|
@ -138,7 +138,7 @@ fetch_repo () {
|
||||
success "SpaceVim 更新已完成"
|
||||
else
|
||||
info "正在安装 SpaceVim..."
|
||||
git clone https://spacevim.org/git/repos/SpaceVim/ "$HOME/.SpaceVim"
|
||||
git clone --depth 1 https://spacevim.org/git/repos/SpaceVim/ "$HOME/.SpaceVim"
|
||||
success "SpaceVim 安装已完成"
|
||||
fi
|
||||
}
|
||||
@ -171,7 +171,7 @@ install_vim () {
|
||||
install_package_manager () {
|
||||
if [[ ! -d "$HOME/.cache/vimfiles/repos/github.com/Shougo/dein.vim" ]]; then
|
||||
info "正在安装 dein.vim"
|
||||
git clone https://github.com/Shougo/dein.vim.git $HOME/.cache/vimfiles/repos/github.com/Shougo/dein.vim
|
||||
git clone --depth 1 https://github.com/Shougo/dein.vim.git $HOME/.cache/vimfiles/repos/github.com/Shougo/dein.vim
|
||||
success "dein.vim 安装已完成"
|
||||
fi
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ sleep 1
|
||||
|
||||
if (!(Test-Path $HOME\.SpaceVim)) {
|
||||
echo "==> Trying to clone $app_name"
|
||||
git clone $repo_url $repo_path
|
||||
git clone --depth 1 $repo_url $repo_path
|
||||
echo "<== $app_name cloned"
|
||||
} else {
|
||||
echo "==> Trying to update $app_name"
|
||||
|
@ -143,7 +143,7 @@ fetch_repo () {
|
||||
success "Successfully update SpaceVim"
|
||||
else
|
||||
info "Trying to clone SpaceVim"
|
||||
git clone https://spacevim.org/git/repos/SpaceVim/ "${XDGSpaceDir:-}"
|
||||
git clone --depth 1 https://spacevim.org/git/repos/SpaceVim/ "${XDGSpaceDir:-}"
|
||||
if [ $? -eq 0 ]; then
|
||||
success "Successfully clone SpaceVim"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user