Sha256: 17a3684031f913c51fa1c1d99d194d42b60489a1c539f194f80aad6f033e41be
Contents?: true
Size: 773 Bytes
Versions: 3
Compression:
Stored size: 773 Bytes
Contents
#!/usr/bin/env jruby require 'rubygems' require 'open-uri' begin require 'chocolate_disco' rescue LoadError require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'chocolate_disco')) end if ARGV.length == 0 STDERR.puts("#{File.basename(__FILE__)} #{ChocolateDisco::Version.to_s}") STDERR.puts("USAGE: chocolate_disco /path/to/file_with.extension [mime]") end # if ARGV.length == 0 unless ARGV[0].nil? if File.exists?(ARGV[0]) && !File.directory?(ARGV[0]) STDERR.puts("Forcing MIME to be '#{ARGV[1]}'.") if ARGV[1].is_a?(String) puts(ChocolateDisco.extract(ARGV[0], :force_mime => ARGV[1])) else # if File.exists?(ARGV[0]) STDERR.puts("File '#{ARGV[0]}' not found.") end # else if File.exists?(ARGV[0]) end # unless ARGV[0].nil?
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hirobumi-chocolate_disco-jruby-0.1.2 | bin/chocolate_disco |
hirobumi-chocolate_disco-jruby-0.1.3 | bin/chocolate_disco |
hirobumi-chocolate_disco-jruby-0.1.4 | bin/chocolate_disco |