Skip to content
Snippets Groups Projects
Commit eb30a855 authored by Adam Vandenberg's avatar Adam Vandenberg
Browse files

Add cache location support to CVS.

This allows formulaes which use CVS to support:
  brew --cache [formula]
parent ff9c5015
No related branches found
No related tags found
No related merge requests found
......@@ -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|
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment