Skip to content

Instantly share code, notes, and snippets.

@morygonzalez
Created September 17, 2013 01:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morygonzalez/6588887 to your computer and use it in GitHub Desktop.
Save morygonzalez/6588887 to your computer and use it in GitHub Desktop.
ag(The Silver Searcher)でEUC-JP/Shift-JISのファイルも検索できるようにしてみた - Thinking-megane http://blog.monochromegane.com/blog/2013/09/15/the-silver-searcher-detects-japanese-char-set/ homebrew 化した。
require 'formula'
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# /usr/local/Library/Contributions/example-formula.rb
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class TheLegacySearcher < Formula
homepage ''
url 'https://github.com/monochromegane/the_silver_searcher/archive/legacy-0.1.tar.gz'
sha1 '9608f10564c64081a38a345ee6848c570a0266f9'
depends_on :automake
depends_on :autoconf
depends_on 'pkg-config' => :build
depends_on 'pcre'
depends_on 'xz'
def install
# Stable tarball does not include pre-generated configure script
system "aclocal -I #{HOMEBREW_PREFIX}/share/aclocal"
system "autoconf"
system "autoheader"
system "automake --add-missing"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make"
system "make install"
bash_completion.install 'ag.bashcomp.sh'
end
def test
system "#{bin}/ag", "--version"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment