Sha256: 68b29e96bc0ecc67381681722030e93cc3c10c8af78a6ae872697fa35f0683d9
Contents?: true
Size: 583 Bytes
Versions: 5
Compression:
Stored size: 583 Bytes
Contents
#! /usr/bin/env ruby # -*- ruby -*- require_relative '../lib/metadata/v2' unless key = ARGV.shift STDERR.puts 'mdata-put: Usage: mdata-put <keyname> [ <value> ]' exit 3 end unless value = ARGV.shift || (STDIN.read unless STDIN.tty?) STDERR.puts 'ERROR: either specify the metadata value as the second command-line argument, or pipe content to stdin.' exit 2 end metadata = Metadata::V2::Client.new response = metadata.put key, value case response.code when 'SUCCESS' exit 0 else STDERR.puts "Error putting metadata for key '#{key}': #{response.decode}" exit 2 end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
metadata-v2-0.8.12 | bin/mdata-put |
metadata-v2-0.8.11 | bin/mdata-put |
metadata-v2-0.8.10 | bin/mdata-put |
metadata-v2-0.8.9 | bin/mdata-put |
metadata-v2-0.8.5.pre | bin/mdata-put |