This commit is contained in:
fengbh 2025-04-19 17:42:42 +08:00
parent c1c7c49000
commit 70e8f72c64

View File

@ -3,7 +3,7 @@
# License : MIT
# Author : Feng Bohan <1953356163@qq.com>
# Date : 2025-04-18 09:02:16
# Last Modified Date: 2025-04-19 17:30:00
# Last Modified Date: 2025-04-19 17:42:03
# Last Modified By : Feng Bohan <1953356163@qq.com>
# -----
# Copyright © 2025 Feng Bohan. All Rights Reserved.
@ -21,18 +21,23 @@ ln -sf "$PWD/bash/bashrc_$HOSTNAME" ~/.bashrc_host
echo "已部署配置!请运行: source ~/.bashrc"
echo "开始配置字体"
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/JetBrainsMono.zip
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/FiraCode.zip
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/Hack.zip
fonts_path="~/.local/share/fonts"
if [ ! -d $fonts_path ]; then
mkdir -p ~/.local/share/fonts
fi
echo "开始解压字体"
unzip FiraCode.zip -d ~/.local/share/fonts/FiraCodeNerdFont
unzip JetBrainsMono.zip -d ~/.local/share/fonts/JetBrainsMonoNerdFont
unzip Hack.zip -d ~/.local/share/fonts/HackNerdFont
get_fonts(){
if [ -f $1.zip ]; then
echo "$1.zip is already exists."
else
echo "start download $1.zip."
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/$1.zip
unzip $1.zip -d ~/.local/share/fonts/$1NerdFont
fi
}
get_fonts "JetBrainsMono"
get_fonts "FiraCode"
get_fonts "Hack"
echo "刷新字体缓存"
fc-cache -fv