YUKI Piro Hiroshi
null+****@clear*****
Fri Jul 11 10:49:06 JST 2014
YUKI "Piro" Hiroshi 2014-07-11 10:49:06 +0900 (Fri, 11 Jul 2014) New Revision: 92d3cac652265b124beaf6d481b57e31400bf6b7 https://github.com/droonga/wikipedia-search/commit/92d3cac652265b124beaf6d481b57e31400bf6b7 Message: Create directory automatically if it is missing Modified files: bin/wikipedia-to-groonga.rb Modified: bin/wikipedia-to-groonga.rb (+2 -0) =================================================================== --- bin/wikipedia-to-groonga.rb 2014-07-11 10:48:53 +0900 (2bcd8b8) +++ bin/wikipedia-to-groonga.rb 2014-07-11 10:49:06 +0900 (1c95cc2) @@ -1,6 +1,7 @@ #!/usr/bin/env ruby require "pathname" +require "fileutils" require "ostruct" require "optparse" @@ -40,6 +41,7 @@ if options.output == "-" output = $stdout converter.convert(output) else + FileUtils.mkdir_p(File.dirname(options.output)) File.open(options.output, "w") do |output| converter.convert(output) end -------------- next part -------------- HTML����������������������������... 下載