Skip to content

Instantly share code, notes, and snippets.

@davidpdrsn
Created September 1, 2013 16:09
Show Gist options
  • Save davidpdrsn/6405414 to your computer and use it in GitHub Desktop.
Save davidpdrsn/6405414 to your computer and use it in GitHub Desktop.
Move fonts in current folder to ~/Library/Fonts (aka install it)
require 'fileutils'
files = Dir.glob("**/*").select do |file|
file if file.match /\.(ttf|otf)$/i
end
files.each do |file|
FileUtils.cp_r file, "/Users/#{`whoami`.chomp}/Library/Fonts", :verbose => true
FileUtils.rm_r file, :verbose => true
puts ""
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment