From 97de7d1081e69ad9d63c03b0f6a700954f8e4402 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 25 Jan 2009 02:06:29 +0000 Subject: * Makefile.in, win32/Makefile.sub (RMDIRS): remove directory and parents. * Makefile.in, win32/Makefile.sub (distclean-rdoc): added to remove temprary rdoc. * Makefile.in, win32/Makefile.sub (distclean): removes extout directory. * Makefile.in, win32/Makefile.sub (clean-ext): skips non-existent directories. * common.mk (clean, distclean): cleans rdoc. * configure.in (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://ci.ruby-lang.org/ruby/trunk@21764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/rmdirs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 tool/rmdirs (limited to 'tool/rmdirs') diff --git a/tool/rmdirs b/tool/rmdirs new file mode 100755 index 0000000000..b116898fac --- /dev/null +++ b/tool/rmdirs @@ -0,0 +1,11 @@ +#!/bin/sh +for dir; do + while rmdir "$dir" >/dev/null 2>&1 && + parent=`expr "$dir" : '\(.*\)/[^/][^/]*'`; do + case "$parent" in + . | .. | "$dir") break;; + *) dir="$parent";; + esac + done +done +true -- cgit v1.2.1