Sha256: 2f68f64dc12df894dd3489f66d033294000e314d0a521340f8be7ee6cb08e5d8
Contents?: true
Size: 652 Bytes
Versions: 8
Compression:
Stored size: 652 Bytes
Contents
#!/usr/bin/env ruby $:.unshift File.expand_path(File.join(__FILE__, "../../lib")) require 'blender' include Blender # commands are just ruby scripts in lib/blender/cli COMMANDS_DIR = File.expand_path("lib/blender/cli", Blender::ROOT) COMMANDS = Dir["#{COMMANDS_DIR}/*rb"].map {|f| File.basename(f).split(".").first} command = ARGV.shift unless command && COMMANDS.include?(command) abort <<-USAGE Usage: blender COMMAND [OPTIONS] Available commands: #{COMMANDS * " "} Run "blender COMMAND -h" to get help about a command USAGE end require 'optparse' require "blender/cli/#{command}" Blender::Cli.const_get(command.capitalize).new(ARGV).execute
Version data entries
8 entries across 8 versions & 1 rubygems