Sha256: be3ed12973b00154a145b1ba2758e13eeb5f35502c00744c85dfd94165a6f0c1

Contents?: true

Size: 584 Bytes

Versions: 1

Compression:

Stored size: 584 Bytes

Contents

#!/usr/bin/env ruby
$:<<File.expand_path("../lib", File.dirname(__FILE__))
require "rubygems"
require "thor"
require "checksummer"

class ChecksummerThor < Thor
  desc "checksum DESTINATION", "checksum"
  method_options :sleep => 0.1, :replace => false
  method_option :dst, :required => true
  def checksum
    if !File.exists?(options.dst)
      puts "ERROR: #{options.dst} does not exist!"
    end
    Checksummer.new(options.dst, :replace => options[:replace], :sleep => options.sleep).checksum_stream($stdin.readlines)
  end
  
  default_task :checksum
end

ChecksummerThor.start

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
checksummer-0.3.0 bin/checksummer2