1 Star 0 Fork 0

hanrongjie/fonts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
uninstall.sh 923 Bytes
一键复制 编辑 原始数据 按行查看 历史
Femi Agbabiaka 提交于 2018-04-22 20:52 . Modify uninstall script as well.
#!/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 uninstall
prefix="$1"
if test "$(uname)" = "Darwin" ; then
# MacOS
font_dir="$HOME/Library/Fonts"
else
# Linux
font_dir="$HOME/.local/share/fonts"
if test ! -d "$font_dir" ; then
echo "It seems there are no powerline fonts installed on your system. Uninstall not needed."
exit 0
fi
fi
# Remove all fonts from user fonts directory
echo "Removing fonts..."
find "$powerline_fonts_dir" \( -name "$prefix*.[ot]tf" -or -name "$prefix*.pcf.gz" \) -type f -print0 | xargs -n1 -0 -I % sh -c "rm -f \"\$0/\${1##*/}\"" "$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 uninstalled from $font_dir"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/stayeveryoung/fonts.git
git@gitee.com:stayeveryoung/fonts.git
stayeveryoung
fonts
fonts
master

搜索帮助