bazaar: load plugins from #{HOMEBREW_PREFIX}/share/bazaar/plugins
This commit is contained in:
parent
d59330cc49
commit
ad4e06bc1c
1 changed files with 2 additions and 22 deletions
|
@ -3,7 +3,7 @@ class Bazaar < Formula
|
|||
homepage "http://bazaar.canonical.com/"
|
||||
url "https://launchpad.net/bzr/2.6/2.6.0/+download/bzr-2.6.0.tar.gz"
|
||||
sha256 "0994797182eb828867eee81cccc79480bd2946c99304266bc427b902cf91dab0"
|
||||
revision 1
|
||||
revision 2
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
|
@ -26,27 +26,7 @@ class Bazaar < Formula
|
|||
inreplace "bzr", "#! /usr/bin/env python", "#!/usr/bin/python"
|
||||
libexec.install "bzr", "bzrlib"
|
||||
|
||||
bin.install_symlink libexec/"bzr"
|
||||
end
|
||||
|
||||
def post_install
|
||||
# Install the plugins under /var/bazaar/plugins/
|
||||
plugins_orig = libexec/"bzrlib/plugins"
|
||||
plugins_new = var/"bazaar/plugins"
|
||||
|
||||
Dir[plugins_orig/"*"].each do |plugin|
|
||||
path = Pathname.new plugin
|
||||
plugins_new.install plugin unless File.exist? (plugins_new/path.basename)
|
||||
end
|
||||
|
||||
rm_rf plugins_orig
|
||||
ln_s plugins_new, plugins_orig
|
||||
end
|
||||
|
||||
def caveats; <<-EOS
|
||||
The plugins directory is located at:
|
||||
#{var}/bazaar/plugins
|
||||
EOS
|
||||
(bin/"bzr").write_env_script(libexec/"bzr", :BZR_PLUGIN_PATH => "+user:#{HOMEBREW_PREFIX}/share/bazaar/plugins")
|
||||
end
|
||||
|
||||
test do
|
||||
|
|
Loading…
Reference in a new issue