Sha256: 545fe9122f799c13e7895046a05a39b574e701ae61dfdccced70aa2ce2352324

Contents?: true

Size: 730 Bytes

Versions: 10

Compression:

Stored size: 730 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)}")
            exclude << Regexp.new("^#{Regexp.quote(doc_dir)}") if doc_dir

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

            file installstamp => srcdir
        end
    end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
autobuild-1.24.0 lib/autobuild/packages/import.rb
autobuild-1.23.1 lib/autobuild/packages/import.rb
autobuild-1.23.0 lib/autobuild/packages/import.rb
autobuild-1.22.1 lib/autobuild/packages/import.rb
autobuild-1.22.0 lib/autobuild/packages/import.rb
autobuild-1.21.0 lib/autobuild/packages/import.rb
autobuild-1.20.0 lib/autobuild/packages/import.rb
autobuild-1.19.0 lib/autobuild/packages/import.rb
autobuild-1.18.1 lib/autobuild/packages/import.rb
autobuild-1.18.0 lib/autobuild/packages/import.rb