Skip to content

Commit

Permalink
Simplify.
Browse files Browse the repository at this point in the history
  • Loading branch information
tim committed Jul 10, 2003
1 parent e9c83e9 commit aaa434a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions post-clean.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
# doc/ex/* (!rb)
require 'ftools'

targets = Dir['doc/*.rb.html']
Dir.chdir('doc')
targets = Dir['*.rb.html']
File.safe_unlink(*targets) unless targets.empty?

targets = Dir['doc/ex/*']
targets.delete_if { |entry| !File.file?(entry) || %r{\.rb\z}.match(entry) }
Dir.chdir('ex')
targets = Dir['*']
targets.delete_if { |entry| File.directory?(entry) || %r{\.rb\z}.match(entry) }
File.safe_unlink(*targets) unless targets.empty?

0 comments on commit aaa434a

Please sign in to comment.