Permalink
Browse files

Install logger.rb to RUBYLIBDIR, not site_dir under 1.8.

  • Loading branch information...
1 parent 24bcea9 commit a93499e464f1140f7d19a3564aef48c86540eec8 nahi committed Sep 18, 2003
Showing with 9 additions and 5 deletions.
  1. +9 −5 install.rb
View
14 install.rb
@@ -5,6 +5,7 @@
include Config
RV = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
+RUBYLIBDIR = CONFIG["rubylibdir"]
DSTPATH = CONFIG["sitedir"] + "/" + RV
def join(*arg)
@@ -16,14 +17,17 @@ def base(name)
end
begin
- File.mkpath(join(DSTPATH, "devel"), true)
- Dir['lib/devel/*.rb'].each do |name|
- File.install(name, join(DSTPATH, 'devel', base(name)), 0644, true)
- end
- Dir['lib/*.rb'].each do |name|
+ name = join('lib', 'logger.rb')
+ if RUBY_VERSION >= '1.8.0'
+ File.install(name, join(RUBYLIBDIR, base(name)), 0644, true)
+ else
File.install(name, join(DSTPATH, base(name)), 0644, true)
end
+ name = join('lib', 'devel', 'logger.rb')
+ File.mkpath(join(DSTPATH, "devel"), true)
+ File.install(name, join(DSTPATH, 'devel', base(name)), 0644, true)
+
puts "install succeed!"
rescue

0 comments on commit a93499e

Please sign in to comment.