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 a3de9759e0 * Makefile.in ({,dist-,real-}clean-ext): should also omit
semicolon when omitting "in WORDS" of FOR-statement.

* tool/rmdirs: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-11 08:01:59 +00:00

11 lines
237 B
Bash
Executable file

#!/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