aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Höltje2012-04-29 02:12:26 -0400
committerJack Nagel2012-05-02 23:43:30 -0500
commit82547a2f8ec7e7af877638c38b97f736fbeb6f29 (patch)
tree132410e21cf51ef4cff5f3e55d5bf1b29de2a0d5
parent4c127549188d46b555d8c62dce0db2ef237aaaba (diff)
downloadhomebrew-82547a2f8ec7e7af877638c38b97f736fbeb6f29.tar.bz2
zsh: support site specific files
This fixes the `site-scripts` and `site-functions` directories so that zsh points to the HOMEBREW_PREFIX version of these files instead of the Cellar version. This means you can drop files in these directories and the files will persist when you upgrade zsh. Otherwise they disappear when you upgrade zsh. Closes #11955. [jn: mkpath everything under share/zsh] Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-rw-r--r--Library/Formula/zsh.rb4
-rw-r--r--Library/Homebrew/keg.rb1
2 files changed, 3 insertions, 2 deletions
diff --git a/Library/Formula/zsh.rb b/Library/Formula/zsh.rb
index 3e20bbef2..4e0bfa7f5 100644
--- a/Library/Formula/zsh.rb
+++ b/Library/Formula/zsh.rb
@@ -18,9 +18,9 @@ class Zsh < Formula
args = %W[
--prefix=#{prefix}
--enable-fndir=#{share}/zsh/functions
- --enable-site-fndir=#{share}/zsh/site-functions
--enable-scriptdir=#{share}/zsh/scripts
- --enable-site-scriptdir=#{share}/zsh/site-scripts
+ --enable-site-fndir=#{HOMEBREW_PREFIX}/share/zsh/site-functions
+ --enable-site-scriptdir=#{HOMEBREW_PREFIX}/share/zsh/site-scripts
--enable-cap
--enable-maildir-support
--enable-multibyte
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index 6e0a857e0..b0f6f0e7b 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -80,6 +80,7 @@ class Keg < Pathname
when INFOFILE_RX then ENV['HOMEBREW_KEEP_INFO'] ? :info : :skip_file
when LOCALEDIR_RX then :mkpath
when *share_mkpaths then :mkpath
+ when /^zsh/ then :mkpath
else :link
end
end