Sha256: 3b29e1a92b31738b612075841bcb5547d55dbfa140a7a19eb8fa6247be52004b

Contents?: true

Size: 429 Bytes

Versions: 3

Compression:

Stored size: 429 Bytes

Contents

#!/usr/bin/env ruby

require 'yaml'

# Set the S3 keys to the right account if the account name was given in the command line
unless ARGV.empty?
  s3_keys = YAML::load_file(File.join(ENV['HOME'], '.s3_keys.yml'))
  if s3_keys.has_key?(ARGV[0])
    keys = s3_keys[ARGV[0]]
    ENV['AMAZON_ACCESS_KEY_ID'] = keys['amazon_access_key_id']
    ENV['AMAZON_SECRET_ACCESS_KEY'] = keys['amazon_secret_access_key']
  end
end

exec("s3sh")

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
spatten-s3lib-0.0.1 bin/s3sh_as
s3lib-0.1.1 bin/s3sh_as
s3lib-0.1.0 bin/s3sh_as