[Groonga-commit] ranguba/rroonga at 5cd8d03 [master] Use unzip as fallback

Back to archive index

Kouhei Sutou null+****@clear*****
Fri May 30 19:01:10 JST 2014


Kouhei Sutou	2014-05-30 19:01:10 +0900 (Fri, 30 May 2014)

  New Revision: 5cd8d03c0b41d953ef72b3b81da1ee773f3b617b
  https://github.com/ranguba/rroonga/commit/5cd8d03c0b41d953ef72b3b81da1ee773f3b617b

  Message:
    Use unzip as fallback

  Modified files:
    ext/groonga/extconf.rb

  Modified: ext/groonga/extconf.rb (+5 -0)
===================================================================
--- ext/groonga/extconf.rb    2014-05-30 18:49:54 +0900 (3438972)
+++ ext/groonga/extconf.rb    2014-05-30 19:01:10 +0900 (9fc9942)
@@ -103,6 +103,11 @@ def extract_zip(filename, destrination_dir)
   end
 
   Archive::Zip.extract(filename, destrination_dir)
+rescue LoadError
+  command_line = ["unzip", filename, "-d", destrination_dir]
+  unless system(*command_line)
+    raise "Failed to unzip: #{command_line.join(' ')}"
+  end
 end
 
 def extract_groonga_win32_binary(major, minor, micro)
-------------- next part --------------
HTML����������������������������...
Télécharger 



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