Sha256: 381ec8cec35fb27bcebdf305d21fd470efafa3c04fa3361aba829ee40db5cd29

Contents?: true

Size: 915 Bytes

Versions: 14

Compression:

Stored size: 915 Bytes

Contents

# install RMagick documentation

require 'ftools'
require 'find'

if defined?(ToplevelInstaller) && self.class == ToplevelInstaller
    $docdir = nil

    # Where to install the documentation
    def docdir
        return $docdir if $docdir
        dir = get_config('doc-dir')+'/'
        dir.sub!(/\A$prefix/, get_config('prefix'))
        $docdir = dir
    end
else
    def docdir
        return ARGV[0]
    end
end

puts "\npost-install.rb: installing documentation..."

Find.find('doc') do |file|
    next if FileTest.directory? file
    target = file.sub(/^doc\//,docdir())
    unless FileTest.exists? File.dirname(target)
        File.makedirs(File.dirname(target), true)
        # Mark this directory as one we created so
        # that uninstall.rb knows it's okay to delete
        f = File.new("#{File.dirname(target)}/.rmagick", "w")
        f.close
    end
    File.install(file, target, 0644)
end
exit

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rmagick-1.10.0 post-install.rb
rmagick-1.10.1 post-install.rb
rmagick-1.7.4 post-install.rb
rmagick-1.7.2 post-install.rb
rmagick-1.8.0 post-install.rb
rmagick-1.7.3 post-install.rb
rmagick-1.7.1 post-install.rb
rmagick-1.8.1 post-install.rb
rmagick-1.9.1 post-install.rb
rmagick-1.9.2 post-install.rb
rmagick-1.8.2 post-install.rb
rmagick-1.9.0 post-install.rb
rmagick-1.8.3 post-install.rb
rmagick-1.9.3 post-install.rb