Skip to content
Permalink
Browse files

Added zcat / gzcat detection.

  • Loading branch information...
watsonian authored and tobi committed Dec 7, 2009
1 parent 85f0115 commit 05adb3df8829536b04e4a454ff19b009402ebef0
Showing with 2 additions and 1 deletion.
  1. 0 bin/clarity
  2. +2 −1 lib/clarity/commands/grep_command_builder.rb
0 bin/clarity 100644 → 100755
No changes.
@@ -39,7 +39,8 @@ def exec_functions


def gzip_tools
terms.empty? ? ['gzcat filename'] : ['zgrep options -e term filename'] + ['grep options -e term'] * (terms.size-1)
cat_tool = (ENV["PATH"].split(":").find{|d| File.exists?(File.join(d, "gzcat"))} ? "zcat" : "gzcat")
terms.empty? ? ["#{cat_tool} filename"] : ['zgrep options -e term filename'] + ['grep options -e term'] * (terms.size-1)
end

def bzip_tools

0 comments on commit 05adb3d

Please sign in to comment.
You can’t perform that action at this time.