Sha256: edb4e3afd3c933765f48afc98e5c73ceefdff2d1b31bcbb1f6cb36ec5376420d

Contents?: true

Size: 795 Bytes

Versions: 17

Compression:

Stored size: 795 Bytes

Contents

#! /usr/bin/env ruby

require 'autoproj/cli/main'
require 'autoproj/cli/locate'

if ARGV.include?('--help') || ARGV.include?('help')
    puts "Usage:"
    puts "  alog [package]"
    puts
    puts "Shows log available for the given package and allows to select and display one"
    exit 0
end

Autoproj::CLI.basic_setup
Autoproj.report(silent: true) do
    cli = Autoproj::CLI::Locate.new

    arg = ARGV.first || Dir.pwd
    if File.directory?(arg)
        arg = "#{File.expand_path(arg)}/"
    end
    log_files = cli.logs_of(arg, log: nil)

    if log_files.size == 1
        logfile = log_files.first
    elsif log_files.size > 1
        logfile = cli.select_log_file(log_files)
    elsif log_files.empty?
        raise "no logs found for #{string}"
    end

    puts File.read(logfile)
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
autoproj-2.7.1 bin/alog
autoproj-2.7.0 bin/alog
autoproj-2.6.1 bin/alog
autoproj-2.6.0 bin/alog
autoproj-2.5.1 bin/alog
autoproj-2.5.0 bin/alog
autoproj-2.5.0.pre1 bin/alog
autoproj-2.4.0 bin/alog
autoproj-2.3.1 bin/alog
autoproj-2.3.0 bin/alog
autoproj-2.2.2 bin/alog
autoproj-2.2.1 bin/alog
autoproj-2.2.0 bin/alog
autoproj-2.1.2 bin/alog
autoproj-2.1.1 bin/alog
autoproj-2.1.0 bin/alog
autoproj-2.1.0.rc1 bin/alog