aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Contributions/cmd/brew-tap-readme.rb
blob: 1aac1b06db63c6d6438d98416ed458a45f14c317 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name = ARGV.first

raise "A name is required" if name.nil?

template = <<-EOS
Homebrew-#{name}
=========#{'=' * name.size}

How do I install these formulae?
--------------------------------
Just `brew tap homebrew/#{name}` and then `brew install <formula>`.

If the formula conflicts with one from mxcl/master or another tap, you can `brew install homebrew/#{name}/<formula>`.

You can also install via URL:

```
brew install https://raw.github.com/Homebrew/homebrew-#{name}/master/<formula>.rb
```

Docs
----
`brew help`, `man brew`, or the Homebrew [wiki][].

[wiki]:http://wiki.github.com/mxcl/homebrew
EOS

# puts ERB.new(template, nil, '>').result(binding)
puts template if ARGV.verbose?
path = Pathname.new('./README.md')
raise "#{path} already exists" if path.exist?
path.write template