Use symlinks for font installation to ~/Library/Fonts/
Homebrew sandboxes post_install, so cp fails with EPERM. Symlinks work around this and also ensure brew uninstall can cleanly remove fonts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
59d8175d75
commit
cb1918c30f
134 changed files with 804 additions and 268 deletions
|
|
@ -121,10 +121,14 @@ class Font{class_name} < Formula
|
|||
user_fonts.mkpath
|
||||
|
||||
Dir.glob(share/"fonts/truetype/*.ttf").each do |f|
|
||||
system "cp", "-f", f, user_fonts.to_s
|
||||
target = user_fonts/File.basename(f)
|
||||
FileUtils.rm_f(target)
|
||||
FileUtils.ln_sf(f, target)
|
||||
end
|
||||
Dir.glob(share/"fonts/opentype/*.otf").each do |f|
|
||||
system "cp", "-f", f, user_fonts.to_s
|
||||
target = user_fonts/File.basename(f)
|
||||
FileUtils.rm_f(target)
|
||||
FileUtils.ln_sf(f, target)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue