diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 6f2dff81d..f4316b9fe 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -204,9 +204,15 @@ class GitDownloadStrategy <AbstractDownloadStrategy end class CVSDownloadStrategy <AbstractDownloadStrategy + def initialize url, name, version, specs + super + @co=HOMEBREW_CACHE+@unique_token + end + + def cached_location; @co; end + def fetch ohai "Checking out #{@url}" - @co=HOMEBREW_CACHE+@unique_token # URL of cvs cvs://:pserver:anoncvs@www.gccxml.org:/cvsroot/GCC_XML:gccxml # will become: @@ -220,14 +226,13 @@ class CVSDownloadStrategy <AbstractDownloadStrategy safe_system '/usr/bin/cvs', '-d', url, 'checkout', '-d', @unique_token, mod end else - d = HOMEBREW_CACHE+@unique_token - puts "Updating #{d}" - Dir.chdir(d) { safe_system '/usr/bin/cvs', 'up' } + puts "Updating #{@co}" + Dir.chdir(@co) { safe_system '/usr/bin/cvs', 'up' } end end def stage - FileUtils.cp_r(Dir[HOMEBREW_CACHE+@unique_token+"*"], Dir.pwd) + FileUtils.cp_r Dir[@co+"*"], Dir.pwd require 'find' Find.find(Dir.pwd) do |path| |
