-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_src.sh
More file actions
executable file
·61 lines (54 loc) · 1.67 KB
/
Copy pathsetup_src.sh
File metadata and controls
executable file
·61 lines (54 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
# 0. 解析参数
HOME=/home/haoming
PRIVILEGE=''
UBUNTU_VER="20.04"
for i in "$@"; do
case $i in
--home=*)
HOME="${i#*=}"
shift
;;
--privilege)
PRIVILEGE="sudo"
shift # past argument=value
;;
--ubuntu-ver=*)
UBUNTU_VER="${i#*=}"
shift # past argument=value
;;
-*|--*)
echo "Unknown option $i"
exit 1
;;
*)
;;
esac
done
RED='\033[0;31m'
echo "${RED}HOME: ${HOME}"
echo "${RED}SUDO: ${SUDO}"
echo "${RED}UBUNTU_VER: ${UBUNTU_VER}"
# 1. 全局变量
path_cfg_neovim=$HOME/.config/nvim
path_cfg_cheats=$HOME/.config/Cheats
path_cfg_snippets=$HOME/.config/Snippets
path_cfg_wiki=$HOME/.config/vimwiki
rm -rf $path_cfg_neovim
rm -rf $path_cfg_cheats
rm -rf $path_cfg_snippets
rm -rf $path_cfg_wiki
# 3. 下载开源代码
echo -e "${RED}下载开源代码"
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
git clone https://github.com/HaomingJu/neovimCfg.git $path_cfg_neovim
git clone https://github.com/HaomingJu/Snippets.git $path_cfg_snippets
git clone https://github.com/HaomingJu/Cheats.git $path_cfg_cheats
git clone https://github.com/HaomingJu/vimwiki.git $path_cfg_wiki
ln -s -f ${HOME}/deployEnv/conf/tigrc ${HOME}/.tigrc
ln -s -f ${HOME}/deployEnv/conf/zshrc ${HOME}/.zshrc
ln -s -f ${HOME}/deployEnv/conf/tigrc.theme ${HOME}/.tigrc.theme
echo -e "${RED}nvim安装插件"
nvim --headless "+Lazy! restore" +qa
nvim --headless "+TSUpdateSync" +qa RUN
nvim --headless "+MasonUpdate" "+MasonInstall clangd pyright lua_ls" +qa