diff options
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli/home.rb')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/home.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/home.rb b/Library/Homebrew/cask/lib/hbc/cli/home.rb new file mode 100644 index 000000000..9c8c0a0e4 --- /dev/null +++ b/Library/Homebrew/cask/lib/hbc/cli/home.rb @@ -0,0 +1,18 @@ +class Hbc::CLI::Home < Hbc::CLI::Base + def self.run(*cask_tokens) + if cask_tokens.empty? + odebug "Opening project homepage" + system "/usr/bin/open", "--", "http://caskroom.io/" + else + cask_tokens.each do |cask_token| + odebug "Opening homepage for Cask #{cask_token}" + cask = Hbc.load(cask_token) + system "/usr/bin/open", "--", cask.homepage + end + end + end + + def self.help + "opens the homepage of the given Cask" + end +end |
