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.31.0 bin/create_cstags
utils-0.30.2 bin/create_cstags
utils-0.30.1 bin/create_cstags
utils-0.30.0 bin/create_cstags
utils-0.29.0 bin/create_cstags
utils-0.28.0 bin/create_cstags
utils-0.27.0 bin/create_cstags
utils-0.26.1 bin/create_cstags
utils-0.26.0 bin/create_cstags
utils-0.25.0 bin/create_cstags
utils-0.24.2 bin/create_cstags
utils-0.24.1 bin/create_cstags
utils-0.24.0 bin/create_cstags
utils-0.23.3 bin/create_cstags
utils-0.23.1 bin/create_cstags
utils-0.23.0 bin/create_cstags
utils-0.22.1 bin/create_cstags
utils-0.22.0 bin/create_cstags
utils-0.21.2 bin/create_cstags
utils-0.21.1 bin/create_cstags