Skip to content
Browse files

Add code to uninstall lib/rvg

  • Loading branch information...
1 parent 9c64960 commit c9f9eed7c9c236e5d3592d777a136b1db3b423c8 rmagick committed Apr 23, 2005
Showing with 3 additions and 2 deletions.
  1. +3 −2 uninstall.rb
View
5 uninstall.rb
@@ -14,12 +14,12 @@ def Dir.safe_unlink(dir)
end
# remove directory & contents if the directory was created by post-install.rb
-def rmdir(dir)
+def rmdir(dir, no_check)
# 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?
@@ -62,6 +62,7 @@ def rmdir(dir)
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')

0 comments on commit c9f9eed

Please sign in to comment.
Something went wrong with that request. Please try again.