From dcc3377aa30b34dfcced0df77696674f91a5a9f3 Mon Sep 17 00:00:00 2001 From: Greg Nisbet Date: Tue, 14 Jun 2016 22:31:48 -0700 Subject: move shell_profile to compat/utils.rb & deprecate --- Library/Homebrew/compat/utils.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Library/Homebrew/compat/utils.rb (limited to 'Library/Homebrew/compat') 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 -- cgit v1.2.3