Sha256: 9effaea714169f2cf955006b1c26bf882241d7a040f83f41950e1cbad8b4b325

Contents?: true

Size: 475 Bytes

Versions: 3

Compression:

Stored size: 475 Bytes

Contents

#!/usr/bin/env ruby

( [1, 9, 2] <=> ( RUBY_VERSION.split(".").collect {|x| x.to_i} ) ) <= 0 or
  abort "Ruby v1.9.2 is required; this is v#{RUBY_VERSION}."

# todo copied from os.rb
NOT_MODIFIED = 3
NOT_FOUND = 4
SUCCESS = 0

timestamp = ARGV[0].to_i
path = ARGV[1]

exit NOT_FOUND unless File.exist?(path)
exit NOT_MODIFIED if File.mtime(path).to_i <= timestamp

File.open(path) do |file|
  while bytes = file.read(4096) do
    $stdout.write(bytes)
  end
end

exit SUCCESS

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fig-1.0.0 bin/fig-download
fig-0.2.5 bin/fig-download
fig-0.2.3 bin/fig-download