mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* 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
This commit is contained in:
		
							parent
							
								
									6ec4b20520
								
							
						
					
					
						commit
						2d2cf42ed1
					
				
					 2 changed files with 8 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,7 @@
 | 
			
		|||
Mon Mar  9 15:19:55 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* instruby.rb (manpages): use basename to compare and for Tempfile.
 | 
			
		||||
 | 
			
		||||
Mon Mar  9 14:55:27 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* instruby.rb (default gems): installs default gemspecs.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue