Skip to content

Commit

Permalink
further fixes to setup.rb for Ruby 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Dec 31, 2013
1 parent 5b2f45c commit 7bbc8cc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Ruby/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

require 'rbconfig'
require 'mkmf'
require 'fileutils'

def usage
puts <<EOU
Expand Down Expand Up @@ -56,7 +57,7 @@ def usage


# Current QuantLib version
Version = "1.4"
Version = "1.3"

cfg = RbConfig::MAKEFILE_CONFIG

Expand Down Expand Up @@ -153,14 +154,14 @@ def execute
archDir = RbConfig::CONFIG["sitearchdir"]
libDir = RbConfig::CONFIG["sitelibdir"]
end
[archDir,libDir].each { |path| File.makedirs path }
[archDir,libDir].each { |path| FileUtils.makedirs path }
if cfg['host_os'][0..5] == 'darwin'
binary = 'QuantLibc.bundle'
else
binary = 'QuantLibc.so'
end
File.install "./"+binary, archDir+"/"+binary, 0555, true
File.install "./QuantLib.rb", libDir+"/QuantLib.rb", 0555, true
FileUtils.install "./"+binary, archDir+"/"+binary, :mode => 0555, :verbose => true
FileUtils.install "./QuantLib.rb", libDir+"/QuantLib.rb", :mode => 0555, :verbose => true
}

availableCommands = {
Expand Down

0 comments on commit 7bbc8cc

Please sign in to comment.