diff options
| author | Paul Buetow <rubyfy@dev.buetow.org> | 2015-09-29 06:53:15 +0100 |
|---|---|---|
| committer | Paul Buetow <rubyfy@dev.buetow.org> | 2015-09-29 06:53:15 +0100 |
| commit | 097b1388b3cdabb8598abebd9d612bb4a1081fe6 (patch) | |
| tree | dbff4eb05bde1234ab3228fc5bdb286086eab0f5 | |
| parent | a1ec74869e715b2fa19dd4820f24df1a832365e3 (diff) | |
add debug switch
| -rwxr-xr-x | rubyfy.rb | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -54,22 +54,18 @@ end begin opts = GetoptLong.new( [ "--command", "-c", GetoptLong::REQUIRED_ARGUMENT ], + [ "--debug", "-d", GetoptLong::OPTIONAL_ARGUMENT ], [ "--parallel", "-p", GetoptLong::OPTIONAL_ARGUMENT ], + [ "--root", "-r", GetoptLong::OPTIONAL_ARGUMENT ], [ "--silent", "-s", GetoptLong::OPTIONAL_ARGUMENT ], [ "--verbose", "-v", GetoptLong::OPTIONAL_ARGUMENT ], - [ "--debug", "-d", GetoptLong::OPTIONAL_ARGUMENT ], - [ "--root", "-r", GetoptLong::OPTIONAL_ARGUMENT ], ) opts.each do |opt, arg| $ARGS[opt] = arg end - if $ARGS["--debug"] - opts.each do |opt, arg| - puts "#{opt} #{arg}" - end - end + log(:DEBUG, $ARGS) if $ARGS["--debug"] servers, jobs = [], [] STDIN.read.split("\n").each { |s| servers << s } |
