Sha256: bbf72ba294ae9c830990943a158e5a864ad7d33c96e7c476e62bc59f22f51563

Contents?: true

Size: 457 Bytes

Versions: 13

Compression:

Stored size: 457 Bytes

Contents

require 'rebuild'

module Rebuild
  class License
    class << self
      def agreed?
        system('gcc 2>&1 | grep -v Agreeing > /dev/null')
      end

      def agree
        execute_exp('agree_license')
      end

      private

      def execute_exp(name)
        script_dir  = File.expand_path('../../../script', __FILE__)
        script_path = File.join(script_dir, "#{name}.exp")
        `sudo expect -f #{script_path}`
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rebuild-0.2.6 lib/rebuild/license.rb
rebuild-0.2.5 lib/rebuild/license.rb
rebuild-0.2.4 lib/rebuild/license.rb
rebuild-0.2.3 lib/rebuild/license.rb
rebuild-0.2.2 lib/rebuild/license.rb
rebuild-0.2.1 lib/rebuild/license.rb
rebuild-0.2.0 lib/rebuild/license.rb
rebuild-0.1.3 lib/rebuild/license.rb
rebuild-0.1.2 lib/rebuild/license.rb
rebuild-0.1.1 lib/rebuild/license.rb
rebuild-0.1.0 lib/rebuild/license.rb
rebuild-0.1.0.pre2 lib/rebuild/license.rb
rebuild-0.1.0.pre lib/rebuild/license.rb