summaryrefslogtreecommitdiff
path: root/instruby.rb
diff options
context:
space:
mode:
author(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-16 12:19:22 +0000
committer(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-16 12:19:22 +0000
commitf12baed5df6d3c213dd75d2f0d9f36bb179fb843 (patch)
treec39f9c14cd6f8bcf85b6b842a2774cafb102bc2e /instruby.rb
parent22ab6d39643b1bbc997e15b763d2b12996b1f1b9 (diff)
This commit was manufactured by cvs2svn to create branch 'RUBY'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/RUBY@9 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: