diff options
| -rw-r--r-- | Library/Formula/rbenv-bundler.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/rbenv-gemset.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/rbenv.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/ruby-build.rb | 5 |
4 files changed, 11 insertions, 4 deletions
diff --git a/Library/Formula/rbenv-bundler.rb b/Library/Formula/rbenv-bundler.rb index d4374c2b8..37b5c3208 100644 --- a/Library/Formula/rbenv-bundler.rb +++ b/Library/Formula/rbenv-bundler.rb @@ -10,6 +10,8 @@ class RbenvBundler < Formula def install prefix.install Dir['*'] - ln_sf opt_prefix, "#{HOMEBREW_PREFIX}/var/lib/rbenv/plugins/#{name}" + rbenv_plugins = "#{HOMEBREW_PREFIX}/var/lib/rbenv/plugins" + mkdir_p rbenv_plugins + ln_sf opt_prefix, "#{rbenv_plugins}/#{name}" end end diff --git a/Library/Formula/rbenv-gemset.rb b/Library/Formula/rbenv-gemset.rb index 056afa278..d3de4097e 100644 --- a/Library/Formula/rbenv-gemset.rb +++ b/Library/Formula/rbenv-gemset.rb @@ -12,6 +12,8 @@ class RbenvGemset < Formula def install prefix.install Dir['*'] - ln_sf opt_prefix, "#{HOMEBREW_PREFIX}/var/lib/rbenv/plugins/#{name}" + rbenv_plugins = "#{HOMEBREW_PREFIX}/var/lib/rbenv/plugins" + mkdir_p rbenv_plugins + ln_sf opt_prefix, "#{rbenv_plugins}/#{name}" end end diff --git a/Library/Formula/rbenv.rb b/Library/Formula/rbenv.rb index 18b4b038f..60d1d5da1 100644 --- a/Library/Formula/rbenv.rb +++ b/Library/Formula/rbenv.rb @@ -7,6 +7,8 @@ class Rbenv < Formula head 'https://github.com/sstephenson/rbenv.git' + # TODO: When we bump the version here we can remove making the plugin + # directory in depending formulae. def install prefix.install Dir['*'] diff --git a/Library/Formula/ruby-build.rb b/Library/Formula/ruby-build.rb index e7fb264a7..381e511e3 100644 --- a/Library/Formula/ruby-build.rb +++ b/Library/Formula/ruby-build.rb @@ -15,7 +15,8 @@ class RubyBuild < Formula ENV['PREFIX'] = prefix system "./install.sh" - ln_sf opt_prefix, "#{HOMEBREW_PREFIX}/var/lib/rbenv/plugins/ruby-build" \ - unless build.include? 'without-rbenv' + rbenv_plugins = "#{HOMEBREW_PREFIX}/var/lib/rbenv/plugins" + mkdir_p rbenv_plugins + ln_sf opt_prefix, "#{rbenv_plugins}/#{name}" unless build.include? 'without-rbenv' end end |
