Răsfoiți Sursa

chore: 更新 setup 脚本,让可选的步骤不再报错,减少不必要的安装错误

dzp 9 luni în urmă
părinte
comite
50a2fce4df
1 a modificat fișierele cu 10 adăugiri și 8 ștergeri
  1. 10 8
      setup

+ 10 - 8
setup

@@ -30,17 +30,19 @@ else
 fi
 
 mkdir -p .config/nvim
-ln -s ../../init.vim .config/nvim/init.vim
+[ ! -e .config/nvim/init.vim ] && ln -s ../../init.vim .config/nvim/init.vim
 
 mkdir -p .local/share/nvim/site/autoload/
-ln -s ../../plugged/vim-plug/plug.vim .local/share/nvim/site/autoload/plug.vim
+[ ! -e .local/share/nvim/site/autoload/plug.vim ] && ln -s ../../plugged/vim-plug/plug.vim .local/share/nvim/site/autoload/plug.vim
 
 mkdir -p .local/share/nvim/plugged
 cd .local/share/nvim/plugged
 
-git clone --depth 1 https://mirror.ghproxy.com/https://github.com/junegunn/vim-plug.git
-git clone --depth 1 https://mirror.ghproxy.com/https://github.com/dzpao/vim-mbs.git
-git clone --depth 1 https://mirror.ghproxy.com/https://github.com/morhetz/gruvbox.git
-git clone --depth 1 https://mirror.ghproxy.com/https://github.com/yegappan/mru.git
-git clone --depth 1 https://mirror.ghproxy.com/https://github.com/jlanzarotta/BufExplorer.git
-git clone --depth 1 https://mirror.ghproxy.com/https://github.com/mhinz/vim-startify.git
+(
+    git clone --depth 1 https://github.com/junegunn/vim-plug.git
+    git clone --depth 1 https://github.com/dzpao/vim-mbs.git
+    git clone --depth 1 https://github.com/morhetz/gruvbox.git
+    git clone --depth 1 https://github.com/yegappan/mru.git
+    git clone --depth 1 https://github.com/jlanzarotta/BufExplorer.git
+    git clone --depth 1 https://github.com/mhinz/vim-startify.git
+) || true