summaryrefslogtreecommitdiffstats
path: root/install.rb
diff options
context:
space:
mode:
authorNigel Kersten <nigelk@google.com>2009-07-23 08:18:13 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-07-24 09:55:16 +1000
commit22145e759cf52d89c685b961d539ce73735258b0 (patch)
treed37c3c83b8352c77babc012e8448e2c9c5bd5696 /install.rb
parent935c46351f6f6730569c50fd0c59e8157486b827 (diff)
downloadpuppet-22145e759cf52d89c685b961d539ce73735258b0.tar.gz
puppet-22145e759cf52d89c685b961d539ce73735258b0.tar.xz
puppet-22145e759cf52d89c685b961d539ce73735258b0.zip
Update install.rb to cope with all OS X versions, not just 10.5
Diffstat (limited to 'install.rb')
-rwxr-xr-xinstall.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/install.rb b/install.rb
index 5353bea1b..5a016481f 100755
--- a/install.rb
+++ b/install.rb
@@ -225,11 +225,12 @@ def prepare_installation
version = [Config::CONFIG["MAJOR"], Config::CONFIG["MINOR"]].join(".")
libdir = File.join(Config::CONFIG["libdir"], "ruby", version)
- # Mac OS X 10.5 declares bindir and sbindir as
+ # Mac OS X 10.5 and higher declare bindir and sbindir as
# /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin
# /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/sbin
# which is not generally where people expect executables to be installed
- if RUBY_PLATFORM == "universal-darwin9.0"
+ # These settings are appropriate defaults for all OS X versions.
+ if RUBY_PLATFORM =~ /^universal-darwin[\d\.]+$/
Config::CONFIG['bindir'] = "/usr/bin"
Config::CONFIG['sbindir'] = "/usr/sbin"
end