1 Star 0 Fork 4

guantou/fonts

forked from lzc2025/fonts 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.sh 760 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
# Set source and target directories
powerline_fonts_dir="$( cd "$( dirname "$0" )" && pwd )"
# if an argument is given it is used to select which fonts to install
prefix="$1"
if test "$(uname)" = "Darwin" ; then
# MacOS
font_dir="$HOME/Library/Fonts"
else
# Linux
font_dir="$HOME/.local/share/fonts"
mkdir -p $font_dir
fi
# Copy all fonts to user fonts directory
echo "Copying fonts..."
find "$powerline_fonts_dir" \( -name "$prefix*.[ot]tf" -or -name "$prefix*.pcf.gz" \) -type f -print0 | xargs -0 -n1 -I % cp "%" "$font_dir/"
# Reset font cache on Linux
if which fc-cache >/dev/null 2>&1 ; then
echo "Resetting font cache, this may take a moment..."
fc-cache -f "$font_dir"
fi
echo "Powerline fonts installed to $font_dir"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yuyudpy/fonts.git
git@gitee.com:yuyudpy/fonts.git
yuyudpy
fonts
fonts
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385