mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00

commit. http://twitter.com/knu/status/18247078381 * tool/rmdirs: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
11 lines
247 B
Bash
Executable file
11 lines
247 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
|