Skip to content
Browse files

first try bashrc, even on macs

  • Loading branch information...
1 parent ba9402b commit 38e0051c32fac564bc652df4fe4d1f378ae8355b @danicgross danicgross committed Nov 22, 2011
Showing with 8 additions and 4 deletions.
  1. +8 −4 setup.py
View
12 setup.py
@@ -24,11 +24,15 @@ class hop_install(install_data.install_data):
def run(self):
install_data.install_data.run(self)
- if sys.platform == "darwin":
- bashrc_path = os.path.expanduser("~/.bash_profile")
- else:
- bashrc_path = os.path.expanduser("~/.bashrc")
+ bash_options = ('~/.bashrc', '~/.bash_profile')
+ bashrc_path = None
+ for bash in bash_options:
+ expanded = os.path.expanduser(bash)
+ if os.path.isfile(expanded):
+ bashrc_path = expanded
+ break
+
prefix = os.path.join(sys.prefix, 'hop')
required_commands = {
'/hop.bash':"# Initialize the 'hop' script\n source %s" % os.path.join(prefix, 'hop.bash'),

0 comments on commit 38e0051

Please sign in to comment.
Something went wrong with that request. Please try again.