diff options
| author | Max Howell | 2009-06-18 09:49:13 +0100 |
|---|---|---|
| committer | Max Howell | 2009-06-18 10:31:15 +0100 |
| commit | b1a628cc993f98b7e87769e9d93d8b677e1a79eb (patch) | |
| tree | 61ce5404b22ed5911a3f2abe3edc00517f3196b8 | |
| parent | e296c08aee44d0042b1669fd9f3b18d03b9b1626 (diff) | |
| download | brew-b1a628cc993f98b7e87769e9d93d8b677e1a79eb.tar.bz2 | |
mv share/doc/name-version to share/doc/name
Versioned docs don't make sense with our installation pattern
| -rw-r--r-- | Library/Homebrew/brewkit.rb | 8 | ||||
| -rwxr-xr-x | bin/brew | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb index 3adbe5195..95243810c 100644 --- a/Library/Homebrew/brewkit.rb +++ b/Library/Homebrew/brewkit.rb @@ -87,9 +87,15 @@ end # make our code neater class Pathname - def mv dst + def mv dst FileUtils.mv to_s, dst end + + def rename dst + dst=Pathname.new dst + dst.unlink if dst.exist? + mv dst + end def install src FileUtils.mv src, to_s @@ -219,12 +219,15 @@ begin o.brew do if ARGV.include? '--interactive' ohai "Entering interactive mode, type `exit' to return to this shell" - exec "bash" + exec "bash" #TODO why exec? else o.install ['README','ChangeLog','COPYING','COPYRIGHT','AUTHORS'].each do |file| FileUtils.cp file, o.prefix if File.file? file end + #this is common, and we don't want it + versioned_docs=o.doc.parent+"#{o.name}-#{o.version}" + versioned_docs.rename o.doc if versioned_docs.exist? end end ohai 'Finishing up' |
