Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 37 lines (31 sloc) 0.899 kb
d9b079a Initial revision
tim authored
1 # install RMagick documentation
2
3 require 'ftools'
4 require 'find'
5
adb1508 Update for use with setup.rb
rmagick authored
6 if defined?(Installer) && self.class == Installer
81f09e9 Add code to allow command-line execution for debugging
tim authored
7 $docdir = nil
d9b079a Initial revision
tim authored
8
81f09e9 Add code to allow command-line execution for debugging
tim authored
9 # Where to install the documentation
10 def docdir
11 return $docdir if $docdir
12 dir = get_config('doc-dir')+'/'
13 dir.sub!(/\A$prefix/, get_config('prefix'))
14 $docdir = dir
15 end
16 else
17 def docdir
18 return ARGV[0]
19 end
d9b079a Initial revision
tim authored
20 end
21
22 puts "\npost-install.rb: installing documentation..."
23
24 Find.find('doc') do |file|
25 next if FileTest.directory? file
26 target = file.sub(/^doc\//,docdir())
27 unless FileTest.exists? File.dirname(target)
28 File.makedirs(File.dirname(target), true)
29 # Mark this directory as one we created so
30 # that uninstall.rb knows it's okay to delete
31 f = File.new("#{File.dirname(target)}/.rmagick", "w")
32 f.close
33 end
34 File.install(file, target, 0644)
35 end
36 exit
Something went wrong with that request. Please try again.