[Groonga-commit] groonga/groonga at 8c87096 [master] Use `gzcat` instead of `zcat` if exists.

Back to archive index

Yuya TAMANO null+****@clear*****
Sat Jul 2 01:40:23 JST 2016


Yuya TAMANO	2016-07-02 01:40:23 +0900 (Sat, 02 Jul 2016)

  New Revision: 8c87096d4112db92d53e24ceb9d42307911427ec
  https://github.com/groonga/groonga/commit/8c87096d4112db92d53e24ceb9d42307911427ec

  Merged 4fc3e9e: Merge pull request #576 from tamano/fix-edict-import-for-osx

  Message:
    Use `gzcat` instead of `zcat` if exists.

  Modified files:
    examples/dictionary/edict/edict-import.sh

  Modified: examples/dictionary/edict/edict-import.sh (+7 -1)
===================================================================
--- examples/dictionary/edict/edict-import.sh    2016-07-01 22:03:52 +0900 (b98397b)
+++ examples/dictionary/edict/edict-import.sh    2016-07-02 01:40:23 +0900 (496f307)
@@ -16,6 +16,12 @@ else
     edict_gz=$2
 fi
 
-if zcat $edict_gz | ${base_dir}/edict2grn.rb | groonga $1 > /dev/null; then
+if type gzcat > /dev/null 2>&1; then
+    zcat='gzcat'
+else
+    zcat='zcat'
+fi
+
+if $zcat $edict_gz | ${base_dir}/edict2grn.rb | groonga $1 > /dev/null; then
   echo "edict data loaded."
 fi
-------------- next part --------------
HTML����������������������������...
다운로드 



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