path: root/win32/rm.bat
diff options
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-25 02:06:29 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-25 02:06:29 (GMT)
commit97de7d1081e69ad9d63c03b0f6a700954f8e4402 (patch)
tree7cab17680e1e1f5c6b9340fb0102ef661f4db6c6 /win32/rm.bat
parent0506348ef501d5f2e3dc64666b6bb6785870583c (diff)
*, win32/Makefile.sub (RMDIRS): remove directory and
parents. *, win32/Makefile.sub (distclean-rdoc): added to remove temprary rdoc. *, win32/Makefile.sub (distclean): removes extout directory. *, win32/Makefile.sub (clean-ext): skips non-existent directories. * (clean, distclean): cleans rdoc. * (RMDIRS, RMALL): added to clean extout. * lib/fileutils.rb (FileUtils#rmdir): added :parents option. * lib/mkmf.rb (create_makefile): cleans installed files at clean instead of distclean. * lib/mkmf.rb (create_makefile): added clean-so and clean-rb. * lib/mkmf.rb (def init_mkmf): added DISTCLEANDIRS. * lib/un.rb (rmdir): added -p option. * tool/rmdirs, win32/rmdirs.bat: removes directory and the parents. * win32/rm.bat: added -r option. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/rm.bat')
1 files changed, 11 insertions, 0 deletions
diff --git a/win32/rm.bat b/win32/rm.bat
index eb415d6..83e3817 100755
--- a/win32/rm.bat
+++ b/win32/rm.bat
@@ -1,8 +1,19 @@
@echo off
if "%1" == "-f" shift
+if "%1" == "-r" (set recursive=1 & goto :optloop)
+if "%recursive%" == "1" goto :recursive
if "%1" == "" goto :end
if exist "%1" del "%1"
+set p=%1
+if exist "%p:/=\%" del "%p:/=\%"
goto :begin
+if "%1" == "" goto :end
+set p=%1
+if exist "%p:/=\%" rd /s /q "%p:/=\%"
+goto :recursive