Sha256: 73dd031b6e59f85d9ba8bc165f9bbd82aaf431237ca9d81c7f5cde36cfa34d21
Contents?: true
Size: 1.29 KB
Versions: 1
Compression:
Stored size: 1.29 KB
Contents
require 'autobuild/config' require 'autobuild/subcommand' require 'autobuild/importer' module Autobuild class CVSImporter < Importer def initialize(root, name, options = {}) @root = root @module = name @program = Autobuild.tool('cvs') @options_up = options[:cvsup] || '-dP' @options_up = Array[*@options_up] @options_co = options[:cvsco] || '-P' @options_co = Array[*@options_co] super(options) end def modulename @module end private def update(package) Dir.chdir(package.srcdir) { Subprocess.run(package.name, :import, @program, 'up', *@options_up) } end def checkout(package) head, tail = File.split(package.srcdir) cvsroot = @root FileUtils.mkdir_p(head) if !File.directory?(head) Dir.chdir(head) { options = [ @program, '-d', cvsroot, 'co', '-d', tail ] + @options_co + [ modulename ] Subprocess.run(package.name, :import, *options) } end end def self.cvs(repo, name, package_options = {}) CVSImporter.new(repo, name, package_options) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
autobuild-0.6 | lib/autobuild/import/cvs.rb |