aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/autojump.rb
blob: ab9a3ec45c71309e673998b232f2c9a40e78ab9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'formula'

class Autojump < Formula
  homepage 'https://github.com/joelthelion/autojump#name'
  url 'https://github.com/downloads/joelthelion/autojump/autojump_v21.0.3.tar.gz'
  sha1 'b81308d6ff50680cb74795195e93427557a938ad'

  head 'https://github.com/joelthelion/autojump.git'

  def install
    inreplace 'autojump.sh', '/etc/profile.d/', "#{prefix}/etc/"

    bin.install 'autojump'
    man1.install 'autojump.1'
    (prefix+'etc').install 'autojump.sh' => 'autojump'
    (prefix+'etc').install 'autojump.bash', 'autojump.zsh'
    (share+'zsh/site-functions').install '_j'
  end

  def caveats; <<-EOS.undent
    Add the following lines to your ~/.bash_profile or ~/.zshrc file (and
    remember to source the file to update your current session):
    if [ -f `brew --prefix`/etc/autojump ]; then
      . `brew --prefix`/etc/autojump
    fi
    EOS
  end
end