2012-01-11 04:05:04 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Autojump < Formula
|
2012-11-01 09:41:44 +00:00
|
|
|
homepage 'https://github.com/joelthelion/autojump#name'
|
2014-05-05 18:32:23 +00:00
|
|
|
url 'https://github.com/joelthelion/autojump/archive/release-v21.7.1.tar.gz'
|
|
|
|
sha1 'bc19d40b3ebe29dc44da950f2c6dbd7da26fb6a3'
|
2012-01-11 04:05:04 +00:00
|
|
|
|
|
|
|
head 'https://github.com/joelthelion/autojump.git'
|
|
|
|
|
|
|
|
def install
|
2012-11-01 09:41:44 +00:00
|
|
|
inreplace 'bin/autojump.sh', ' /etc/profile.d/', " #{prefix}/etc/"
|
2012-01-11 04:05:04 +00:00
|
|
|
|
2014-01-08 07:58:34 +00:00
|
|
|
libexec.install 'bin/autojump'
|
|
|
|
libexec.install 'bin/autojump_argparse.py', 'bin/autojump_data.py', 'bin/autojump_utils.py' if build.head?
|
2012-11-01 09:41:44 +00:00
|
|
|
man1.install 'docs/autojump.1'
|
2013-07-31 15:12:27 +00:00
|
|
|
(prefix/'etc').install 'bin/autojump.sh', 'bin/autojump.bash', 'bin/autojump.zsh'
|
2013-05-03 18:09:00 +00:00
|
|
|
zsh_completion.install 'bin/_j'
|
2014-08-27 08:35:10 +00:00
|
|
|
(prefix/'etc').install 'bin/autojump.fish'
|
2014-01-08 07:58:34 +00:00
|
|
|
|
|
|
|
bin.write_exec_script libexec+'autojump'
|
2012-01-11 04:05:04 +00:00
|
|
|
end
|
|
|
|
|
2013-07-31 15:12:27 +00:00
|
|
|
def caveats;
|
|
|
|
msg = <<-EOS.undent
|
2012-11-01 09:41:44 +00:00
|
|
|
Add the following line to your ~/.bash_profile or ~/.zshrc file (and remember
|
|
|
|
to source the file to update your current session):
|
2013-07-31 15:12:27 +00:00
|
|
|
[[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh
|
2012-01-11 04:05:04 +00:00
|
|
|
EOS
|
2013-07-31 15:12:27 +00:00
|
|
|
|
|
|
|
if build.head?
|
|
|
|
msg += <<-EOS.undent
|
|
|
|
|
|
|
|
Add the following line to your ~/.config/fish/config.fish:
|
|
|
|
. /usr/local/Cellar/autojump/HEAD/etc/autojump.fish
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
msg
|
2012-01-11 04:05:04 +00:00
|
|
|
end
|
|
|
|
end
|