uninstall.rb in rmagick-1.7.4 vs uninstall.rb in rmagick-1.8.0

- old
+ new

@@ -12,16 +12,16 @@ end end end # remove directory & contents if the directory was created by post-install.rb -def rmdir(dir) +def rmdir(dir, no_check=false) # This can 't happen, but you can never be too safe... if dir == '/' then raise RuntimeError, "rm -rf /? I don't think so!" end - if File.file? dir+'/.rmagick' then + if no_check || File.file?(dir+'/.rmagick') then targets = Dir[dir+'/*'] targets += Dir[dir+'/.*'].delete_if { |f| FileTest.directory?(f) } if not targets.empty? File.safe_unlink(*targets) end @@ -60,9 +60,10 @@ doc_dir ||= prefix+'/share/RMagick' File.safe_unlink("#{site_ruby}/RMagick.rb", true) File.safe_unlink("#{so_dir}/RMagick.so", true) +rmdir("#{site_ruby}/rvg", true) rmdir(doc_dir+'/ex/images') rmdir(doc_dir+'/ex') rmdir(doc_dir+'/css') rmdir(doc_dir+'/scripts') rmdir(doc_dir)