summaryrefslogtreecommitdiff
path: root/instruby.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-09 06:19:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-09 06:19:57 +0000
commit2d2cf42ed1d6fcc8a0fb62e91211a6819757d994 (patch)
tree79cd46e671f52d0fd701b2034132275d4adf161b /instruby.rb
parent6ec4b205203786a8591d029f0c50429a96752dee (diff)
* instruby.rb (manpages): use basename to compare and for Tempfile.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'instruby.rb')
-rwxr-xr-xinstruby.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/instruby.rb b/instruby.rb
index 4d91859fa0..fbbecbdac7 100755
--- a/instruby.rb
+++ b/instruby.rb
@@ -452,19 +452,20 @@ install?(:local, :comm, :man) do
require File.join(srcdir, "tool/mdoc2man.rb") if $mantype != "doc"
mdocs.each do |mdoc|
next unless File.file?(mdoc) and open(mdoc){|fh| fh.read(1) == '.'}
- if mdoc == "goruby.1"
+ base = File.basename(mdoc)
+ if base == "goruby.1"
next unless has_goruby
end
destdir = mandir + (section = mdoc[/\d+$/])
- destname = ruby_install_name.sub(/ruby/, File.basename(mdoc, ".#{section}"))
+ destname = ruby_install_name.sub(/ruby/, base.chomp(".#{section}"))
destfile = File.join(destdir, "#{destname}.#{section}")
if $mantype == "doc"
install mdoc, destfile, :mode => $data_mode
else
w = nil
- Tempfile.open(mdoc) do |f|
+ Tempfile.open(base) do |f|
w = f
open(mdoc) {|r| Mdoc2Man.mdoc2man(r, w)}
end