From 50a9d1db259e5ab7d952317f1c2208f393753fc4 Mon Sep 17 00:00:00 2001 From: knu Date: Mon, 18 Nov 2002 16:57:36 +0000 Subject: * bin/irb: Moved from sample/irb.rb. * instruby.rb: Install script files under bin/ with ruby's program prefix and suffix. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ bin/irb | 21 +++++++++++++++++++++ instruby.rb | 8 +++++++- sample/irb.rb | 21 --------------------- 4 files changed, 35 insertions(+), 22 deletions(-) create mode 100644 bin/irb delete mode 100644 sample/irb.rb diff --git a/ChangeLog b/ChangeLog index 8a661e7c9..b03ac4614 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Nov 19 01:53:35 2002 Akinori MUSHA + + * bin/irb: Moved from sample/irb.rb. + + * instruby.rb: Install script files under bin/ with ruby's program + prefix and suffix. + Mon Nov 18 02:13:36 2002 Akinori MUSHA * lib/tempfile.rb: Make this libary thread safe. diff --git a/bin/irb b/bin/irb new file mode 100644 index 000000000..58f369913 --- /dev/null +++ b/bin/irb @@ -0,0 +1,21 @@ +#!/usr/bin/env ruby +# +# irb.rb - intaractive ruby +# $Release Version: 0.7.3 $ +# $Revision$ +# $Date$ +# by Keiju ISHITSUKA(keiju@ishitsuka.com) +# + +require "irb" + +if __FILE__ == $0 + IRB.start(__FILE__) +else + # check -e option + if /^-e$/ =~ $0 + IRB.start(__FILE__) + else + IRB.initialize(__FILE__) + end +end diff --git a/instruby.rb b/instruby.rb index 8ab84ad93..6449298b0 100644 --- a/instruby.rb +++ b/instruby.rb @@ -98,7 +98,13 @@ end Dir.chdir CONFIG["srcdir"] -Installer.install "sample/irb.rb", "#{bindir}/irb", 0755, true +for f in Dir["bin/*"] + next unless File.file?(f) + + name = ruby_install_name.sub(/ruby/, File.basename(f)) + + Installer.install f, File.join(bindir, name), 0755, true +end Dir.glob("lib/**/*{.rb,help-message}") do |f| dir = File.dirname(f).sub!(/\Alib/, rubylibdir) || rubylibdir diff --git a/sample/irb.rb b/sample/irb.rb deleted file mode 100644 index 58f369913..000000000 --- a/sample/irb.rb +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env ruby -# -# irb.rb - intaractive ruby -# $Release Version: 0.7.3 $ -# $Revision$ -# $Date$ -# by Keiju ISHITSUKA(keiju@ishitsuka.com) -# - -require "irb" - -if __FILE__ == $0 - IRB.start(__FILE__) -else - # check -e option - if /^-e$/ =~ $0 - IRB.start(__FILE__) - else - IRB.initialize(__FILE__) - end -end -- cgit