File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -147,17 +147,27 @@ def gen_sub_directories
147147 @outputdir . mkpath
148148 end
149149
150- ### Copy over the stylesheet into the appropriate place in the
151- ### output directory.
150+ ### Copy over the stylesheet into the appropriate place in the output
151+ ### directory.
152152 def write_style_sheet
153- debug_msg "Copying over static files"
154- staticfiles = %w[ rdoc.css js images ]
155- staticfiles . each do |path |
156- FileUtils . cp_r ( @template_dir + path , '.' , :verbose => $DEBUG, :noop => $dryrun )
157- end
158- end
153+ debug_msg "Copying static files"
154+ options = { :verbose => $DEBUG_RDOC, :noop => $dryrun }
155+
156+ FileUtils . cp @template_dir + 'rdoc.css' , '.' , options
157+
158+ Dir [ @template_dir + "{js,images}/**/*" ] . each do |path |
159+ next if File . directory? path
160+ next if path =~ /#{ File ::SEPARATOR } \. /
159161
162+ dst = Pathname . new ( path ) . relative_path_from @template_dir
160163
164+ # I suck at glob
165+ dst_dir = dst . dirname
166+ FileUtils . mkdir_p dst_dir , options unless File . exist? dst_dir
167+
168+ FileUtils . cp @template_dir + path , dst , options
169+ end
170+ end
161171
162172 ### Build the initial indices and output objects
163173 ### based on an array of TopLevel objects containing
You can’t perform that action at this time.
0 commit comments