Sha256: a528099563a1753304b05102a3f1ae235b55747083b5284a3e21c0deb9cd9194

Contents?: true

Size: 768 Bytes

Versions: 7

Compression:

Stored size: 768 Bytes

Contents

require 'autobuild/timestamps'
require 'autobuild/package'

module Autobuild
    def self.import(spec, &proc)
        ImporterPackage.new(spec, &proc)
    end
    
    class ImporterPackage < Package
        attr_reader :exclude

        def initialize(*args)
            @exclude = []
            super
        end

        def prepare
            super

            exclude = self.exclude.dup
            exclude << Regexp.new("^#{Regexp.quote(installstamp)}")
            if doc_dir
                exclude << Regexp.new("^#{Regexp.quote(doc_dir)}")
            end

            source_tree(srcdir) do |pkg|
                pkg.exclude.concat exclude
                exclude.freeze
            end

            file installstamp => srcdir
        end
    end
end


Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
autobuild-1.17.0 lib/autobuild/packages/import.rb
autobuild-1.16.0 lib/autobuild/packages/import.rb
autobuild-1.15.0 lib/autobuild/packages/import.rb
autobuild-1.14.1 lib/autobuild/packages/import.rb
autobuild-1.14.0 lib/autobuild/packages/import.rb
autobuild-1.13.0 lib/autobuild/packages/import.rb
autobuild-1.13.0.pre1 lib/autobuild/packages/import.rb