diff options
| author | Adam Vandenberg | 2013-05-31 14:44:45 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2013-05-31 14:45:43 -0700 |
| commit | 9329f422c51c06dd76c010cff01be693a0c713ad (patch) | |
| tree | 2371c6cfef1f14da5451bd75765018b4e147e62a /Library | |
| parent | 87cc5eb7f337adc9d5945504760eb1ff63e22c21 (diff) | |
| download | homebrew-9329f422c51c06dd76c010cff01be693a0c713ad.tar.bz2 | |
Add `brew tap-readme <name>` external command.
Closes #17935.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-tap-readme.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Library/Contributions/cmd/brew-tap-readme.rb b/Library/Contributions/cmd/brew-tap-readme.rb new file mode 100755 index 000000000..1aac1b06d --- /dev/null +++ b/Library/Contributions/cmd/brew-tap-readme.rb @@ -0,0 +1,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 |
