Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
インストール済みの formula のなかで Xcode.app が必要なやつを知りたい
#/usr/bin/env ruby
require 'json'
JSON.parse(`brew info --json=v1 --installed`)
.select { |formula|
formula["requirements"].any? { |req| req["name"].downcase == "xcode" }
}
.each { |formula|
puts formula["name"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment