Sha256: 16176fb812dd8e7e94222d4495f77989104edb8f0b874a9e1c197fe9b87f4e24

Contents?: true

Size: 597 Bytes

Versions: 5

Compression:

Stored size: 597 Bytes

Contents

# frozen_string_literal: true

require 'find'

module Xezat
  module Detector
    class Libtool
      def detect(variables)
        Find.find(variables[:S]) do |file|
          return true if file.end_with?("#{File::SEPARATOR}ltmain.sh")
        end
        Find.find(variables[:S]) do |file|
          next unless file.end_with?("#{File::SEPARATOR}Makefile", "#{File::SEPARATOR}makefile")
          next if File.directory?(file)

          File.foreach(file) do |line|
            return true if line.lstrip.include?('libtool')
          end
        end
        false
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
xezat-0.3.1 lib/xezat/detector/libtool.rb
xezat-0.3.0 lib/xezat/detector/libtool.rb
xezat-0.2.3 lib/xezat/detector/libtool.rb
xezat-0.2.2 lib/xezat/detector/libtool.rb
xezat-0.2.1 lib/xezat/detector/libtool.rb