#!/usr/bin/env ruby require 'rbbt' require 'rbbt/util/simpleopt' options = SOPT.setup < ... -a --arg1 --arg2='value' --arg3 'another-value'" --log* #{Log.color :yellow, "Log level from 0 (debug) 6 (errors)"} -cd--command_dir* #{Log.color :yellow, "Directory from where to load command scripts"} --profile #{Log.color :yellow, "Profile execution"} --nocolor #{Log.color :yellow, "Disable colored output"} --locate_file #{Log.color :yellow, "Report the location of the script instead of executing it"} EOF Log.nocolor = true if options[:nocolor] locate = options.delete :locate_file if options[:log] Log.severity = options[:log].to_i end if options[:command_dir] $rbbt_command_dir = Path.setup(options[:command_dir].dup) else $rbbt_command_dir = Rbbt.share.rbbt_commands end SOPT.description =< 10) end end