summaryrefslogtreecommitdiff
path: root/instruby.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-16 12:19:09 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-16 12:19:09 +0000
commit62e41d3f2e48422bbdf1bb2db83ae60b255b1a1a (patch)
tree4d0edb1c1986e1578b181ebe2441acfee27f1fab /instruby.rb
parent3db12e8b236ac8f88db8eb4690d10e4a3b8dbcd4 (diff)
Initial revision
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'instruby.rb')
-rw-r--r--instruby.rb37
1 files changed, 37 insertions, 0 deletions
diff --git a/instruby.rb b/instruby.rb
new file mode 100644
index 0000000..8fd7705
--- /dev/null
+++ b/instruby.rb
@@ -0,0 +1,37 @@
+#!./miniruby
+require "rbconfig.rb"
+include Config
+
+$:.unshift CONFIG["srcdir"]+"/lib"
+require "ftools"
+
+binsuffix = CONFIG["binsuffix"]
+if ENV["prefix"]
+ prefix = ENV["prefix"]
+else
+ prefix = CONFIG["prefix"]
+end
+ruby_install_name = CONFIG["ruby_install_name"]
+bindir = prefix + "/bin"
+libdir = prefix + "/lib/" + ruby_install_name
+archdir = libdir+"/"+CONFIG["arch"]
+mandir = CONFIG["mandir"] + "/man1"
+
+File.install "ruby#{binsuffix}",
+ "#{bindir}/#{ruby_install_name}#{binsuffix}", 0755, TRUE
+File.makedirs libdir, TRUE
+Dir.chdir "ext"
+system "../miniruby#{binsuffix} extmk.rb install"
+Dir.chdir CONFIG["srcdir"]
+IO.foreach 'MANIFEST' do |$_|
+ $_.chop!
+ if /^lib/
+ File.install $_, libdir, 0644, TRUE
+ elsif /^[a-z]+\.h$/
+ File.install $_, archdir, 0644, TRUE
+ end
+ File.install "config.h", archdir, 0644, TRUE
+end
+File.install "rbconfig.rb", archdir, 0644, TRUE
+File.install "ruby.1", mandir, 0644, TRUE
+# vi:set sw=2: