summaryrefslogtreecommitdiff
path: root/tool/rmdirs
blob: 76c4a39cb142babbddeff773f78ad5d267ae2202 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

# Script used by configure to delete directories recursively.

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