aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compat
diff options
context:
space:
mode:
authorGreg Nisbet2016-06-14 22:31:48 -0700
committerGreg Nisbet2016-08-10 23:21:30 -0700
commitdcc3377aa30b34dfcced0df77696674f91a5a9f3 (patch)
tree0e0e2133f7e7f335b252c6aaeb8ce8bcba79161d /Library/Homebrew/compat
parentbf63c08d50acb5fa79413325029e67e2c28a6023 (diff)
downloadbrew-dcc3377aa30b34dfcced0df77696674f91a5a9f3.tar.bz2
move shell_profile to compat/utils.rb & deprecate
Diffstat (limited to 'Library/Homebrew/compat')
-rw-r--r--Library/Homebrew/compat/utils.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/compat/utils.rb b/Library/Homebrew/compat/utils.rb
new file mode 100644
index 000000000..7de5e85c3
--- /dev/null
+++ b/Library/Homebrew/compat/utils.rb
@@ -0,0 +1,10 @@
+# return the shell profile file based on users' preference shell
+def shell_profile
+ opoo "shell_profile has been deprecated in favor of Utils::Shell.profile"
+ case ENV["SHELL"]
+ when %r{/(ba)?sh} then "~/.bash_profile"
+ when %r{/zsh} then "~/.zshrc"
+ when %r{/ksh} then "~/.kshrc"
+ else "~/.bash_profile"
+ end
+end