[Groonga-commit] groonga/groonga at 553e694 [master] Add debug mode

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Nov 4 16:21:01 JST 2015


Kouhei Sutou	2015-11-04 16:21:01 +0900 (Wed, 04 Nov 2015)

  New Revision: 553e6942f4aa05b69aba5cf7795c6f9d38f83fb5
  https://github.com/groonga/groonga/commit/553e6942f4aa05b69aba5cf7795c6f9d38f83fb5

  Message:
    Add debug mode

  Modified files:
    vendor/download_mecab.rb

  Modified: vendor/download_mecab.rb (+5 -0)
===================================================================
--- vendor/download_mecab.rb    2015-11-04 15:58:21 +0900 (be181c8)
+++ vendor/download_mecab.rb    2015-11-04 16:21:01 +0900 (89c1a07)
@@ -14,10 +14,15 @@ mecab_naist_jdic_version = (base_dir + "bundled_mecab_naist_jdic_version").read.
 mecab_base = "mecab-#{mecab_version}"
 mecab_naist_jdic_base = "mecab-naist-jdic-#{mecab_naist_jdic_version}"
 
+def debug?
+  ENV["DEBUG"] == "true"
+end
+
 def extract_tar_gz(tar_gz_path)
   Zlib::GzipReader.open(tar_gz_path) do |tar_io|
     Gem::Package::TarReader.new(tar_io) do |tar|
       tar.each do |entry|
+        p [entry.header.typeflag, entry.full_name] if debug?
         if entry.directory?
           FileUtils.mkdir_p(entry.full_name)
         elsif entry.file?
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index