From 75d59e33267be57218b6a7011c32677204f2dc61 Mon Sep 17 00:00:00 2001 From: syui Date: Fri, 3 Apr 2026 14:36:20 +0900 Subject: [PATCH] fix curl font --- install.zsh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/install.zsh b/install.zsh index dfaa3f0..5c8062f 100755 --- a/install.zsh +++ b/install.zsh @@ -5,7 +5,7 @@ dotdir="${1:-$HOME/dotfiles}" files=(.zshrc .vimrc .tmux.conf .gitconfig .config/karabiner/karabiner.json) -dirs=(.zsh .vim/plugin .tmux .local/bin .local/share/fonts) +dirs=(.zsh .vim/plugin .tmux .local/bin) # backup and symlink files for f in "${files[@]}"; do @@ -55,9 +55,15 @@ if [ ! -f "$HOME/.vim/autoload/plug.vim" ]; then echo "vim plugins: installed" fi -# install font (mac only) -if [ "$(uname)" = "Darwin" ] && [ -f "$dotdir/.local/share/fonts/aifont.ttf" ]; then - cp -f "$dotdir/.local/share/fonts/aifont.ttf" ~/Library/Fonts/aifont.ttf +# install font +fontpath="$HOME/.local/share/fonts/aifont.ttf" +if [ ! -f "$fontpath" ]; then + mkdir -p "$HOME/.local/share/fonts" + curl -sL -o "$fontpath" https://git.syui.ai/ai/font/raw/branch/main/aifont.ttf + echo "font: downloaded aifont.ttf" +fi +if [ "$(uname)" = "Darwin" ] && [ -f "$fontpath" ]; then + cp -f "$fontpath" ~/Library/Fonts/aifont.ttf echo "font: aifont.ttf -> ~/Library/Fonts/" fi