35 lines
1005 B
Bash
Executable File
35 lines
1005 B
Bash
Executable File
#!/bin/bash
|
||
# File : setup.sh
|
||
# License : MIT
|
||
# Author : Feng Bohan <1953356163@qq.com>
|
||
# Date : 2025-04-18 09:02:16
|
||
# Last Modified Date: 2025-04-19 16:00:47
|
||
# Last Modified By : Feng Bohan <1953356163@qq.com>
|
||
# -----
|
||
# Copyright © 2025 Feng Bohan. All Rights Reserved.
|
||
|
||
echo "开始配置VIM"
|
||
# 链接配置文件
|
||
ln -sf ~/dotfiles/vim/.vimrc ~/.vimrc
|
||
|
||
# 安装 Vim-Plug(如未安装)
|
||
if [ ! -f ~/.vim/autoload/plug.vim ]; then
|
||
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||
fi
|
||
|
||
# 安装插件
|
||
echo "请手动执行命令:PlugInstall 安装插件"
|
||
|
||
echo "开始配置bashrc"
|
||
|
||
# 创建符号链接
|
||
ln -sf "$PWD/bash/bashrc_common" ~/.bashrc_common
|
||
|
||
# 根据当前主机名链接对应的配置
|
||
HOSTNAME=$(hostname -s)
|
||
ln -sf "$PWD/bash/bashrc_$HOSTNAME" ~/.bashrc_host
|
||
|
||
# 提示用户手动 source 或重启 Shell
|
||
echo "已部署配置!请运行: source ~/.bashrc"
|