summaryrefslogtreecommitdiff
path: root/instruby.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-03-24 08:52:35 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-03-24 08:52:35 +0000
commit35247a52ef719584a59ae9c518523f0ee825c8e3 (patch)
treee14e2a884d3c40a86f93b8dcb4ec144f510fe35a /instruby.rb
parent1727010a3abf84fd06f0e44d44b1b8ef6cde588e (diff)
990324
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'instruby.rb')
-rw-r--r--instruby.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/instruby.rb b/instruby.rb
index 6f46f86..4f0f217 100644
--- a/instruby.rb
+++ b/instruby.rb
@@ -7,6 +7,7 @@ destdir = ARGV[0] || ''
$:.unshift CONFIG["srcdir"]+"/lib"
require "ftools"
+require "find"
binsuffix = CONFIG["binsuffix"]
if ENV["prefix"]
@@ -51,8 +52,12 @@ File.makedirs archdir, true
Dir.chdir "ext"
system "../miniruby#{binsuffix} extmk.rb install #{destdir}"
Dir.chdir CONFIG["srcdir"]
-for f in Dir["lib/*.rb"]
- File.install f, pkglibdir, 0644, true
+
+Find.find("lib") do |f|
+ next unless /\.rb$/ =~ f
+ dir = pkglibdir+"/"+File.dirname(f[4..-1])
+ File.makedirs dir, true unless File.directory? dir
+ File.install f, dir, 0644, true
end
for f in Dir["*.h"]