Skip to content

Commit

Permalink
Merge pull request #576 from tamano/fix-edict-import-for-osx
Browse files Browse the repository at this point in the history
Use `gzcat` instead of `zcat` if exists.

Patch by Yuya TAMANO. Thanks!!!
  • Loading branch information
kou committed Jul 2, 2016
2 parents ceb2fe7 + 8c87096 commit 4fc3e9e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/dictionary/edict/edict-import.sh
Expand Up @@ -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

0 comments on commit 4fc3e9e

Please sign in to comment.