bin/dyn-rebase-url in dyndoc-ruby-1.4.6 vs bin/dyn-rebase-url in dyndoc-ruby-1.4.7

- old
+ new

@@ -7,30 +7,30 @@ while ["--dir","--mode","--from","--to","--help","--ext"].include? ARGV[cur] ##p [:cur,ARGV[cur]] case ARGV[cur] when "--dir","--help" - opts[ARGV[cur].to_sym]=true + opts[ARGV[cur][2..-1].to_sym]=true cur += 1 when "--mode" opts[:mode]==ARGV[cur+1].to_sym if ["default","href"].include? ARGV[cur+1] cur += 2 when "--from","--to" opts[ARGV[cur][2..-1].to_sym]=ARGV[cur+1] cur += 2 when "--ext" - opts[ARGV[cur].to_sym]=ARGV[cur+1] + opts[ARGV[cur][2..-1].to_sym]=ARGV[cur+1] cur += 2 end end file=ARGV[cur] opts[:help]=true unless file if opts[:help] puts "rebase_url [--dir] [--from <from_path>] [--to <to_path>] [--ext <extension>] file" else ext=opts[:ext] ? "."+opts[:ext] : "" - files=opts[:"--dir"] ? Dir[File.join(file,"*"+ext)] : [file] + files=opts[:dir] ? Dir[File.join(file,"*"+ext)] : [file] ##p files ##p opts files.each do |filename| content=File.read(filename) File.open(filename,"w") do |f| \ No newline at end of file