1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool/rmdirs
nobu 9d3d606907 * Makefile.in ({,dist-,real-}clean-ext): omission of "in WORDS" of
FOR-statement is not allowed in /bin/sh on Solaris.  fore-ported
  r28609 from 1.9.2.

* tool/rmdirs: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-11 06:36:21 +00:00

11 lines
246 B
Bash
Executable file

#!/bin/sh
for dir in "$@"; do
while rmdir "$dir" >/dev/null 2>&1 &&
parent=`expr "$dir" : '\(.*\)/[^/][^/]*'`; do
case "$parent" in
. | .. | "$dir") break;;
*) dir="$parent";;
esac
done
done
true