Sha256: 5f9f8fad3409efe904559dfec8e396493056deed5730e5985761c9f2d0774cbf

Contents?: true

Size: 666 Bytes

Versions: 50

Compression:

Stored size: 666 Bytes

Contents

#!/usr/bin/env ruby

require 'utils'
require 'infobar'

config = Utils::ConfigFile.new
config.configure_from_paths

roots = %w[ . ] + `bundle list --paths`.lines.map(&:chomp)

IO.popen('cscope 2>/dev/null -R -b -i - -f cscope.out', 'w') do |scope|
  finder = Utils::Finder.new(
    pattern: '',
    roots:   roots,
    config:  config,
  )
  finder.search.paths.with_infobar(label: 'Collecting files') do |path|
    scope.puts path
    +infobar
  end

  infobar.newline
  Infobar.busy(label: 'Creating cstags') do
    scope.close
  end
end

if megabytes = File.size('cscope.out').to_f / 1024 ** 2 rescue nil
  infobar.puts 'Created %.3fM of cstags.' % megabytes
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
utils-0.48.0 bin/create_cstags
utils-0.47.0 bin/create_cstags
utils-0.46.0 bin/create_cstags
utils-0.45.0 bin/create_cstags
utils-0.44.0 bin/create_cstags
utils-0.43.0 bin/create_cstags
utils-0.42.0 bin/create_cstags
utils-0.41.0 bin/create_cstags
utils-0.40.0 bin/create_cstags
utils-0.39.0 bin/create_cstags
utils-0.38.0 bin/create_cstags
utils-0.37.1 bin/create_cstags
utils-0.37.0 bin/create_cstags
utils-0.36.0 bin/create_cstags
utils-0.35.0 bin/create_cstags
utils-0.34.0 bin/create_cstags
utils-0.33.1 bin/create_cstags
utils-0.33.0 bin/create_cstags
utils-0.32.0 bin/create_cstags
utils-0.31.1 bin/create_cstags