diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-29 07:08:04 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-29 07:08:04 +0000 |
commit | 706536ff0f0ea0ec21ea9507523f83aca78918bd (patch) | |
tree | b5941665c823546fcb1dc5a4a7e2fc83d6f86239 /instruby.rb | |
parent | 49ad283b972b7e18436bd56465130b5d90fcedb6 (diff) |
* instruby.rb (install): preserve the timestamp for Mac OS X ranlib problem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'instruby.rb')
-rw-r--r-- | instruby.rb | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/instruby.rb b/instruby.rb index 3f39865eff..3b139941fe 100644 --- a/instruby.rb +++ b/instruby.rb @@ -49,17 +49,20 @@ end parse_args() -include FileUtils +include FileUtils::Verbose include FileUtils::NoWrite if $dryrun @fileutils_output = STDOUT @fileutils_label = '' -alias makelink ln_sf -class << self - body = proc {|*args|super(*fu_update_option(args,:verbose=>true))} - for func in [:install, :makelink] - define_method(func, body) + +def install(src, dest, options = {}) + super + return if options[:noop] + fu_each_src_dest(src, dest) do |s, d| + st = File.stat(s) + File.utime(st.atime, st.mtime, d) end end + $made_dirs = {} def makedirs(dirs) dirs = fu_list(dirs) @@ -112,7 +115,7 @@ end if dll == lib and dll != arc for link in CONFIG["LIBRUBY_ALIASES"].split - makelink(dll, File.join(libdir, link)) + ln_sf(dll, File.join(libdir, link)) end end |