diff options
| author | Brian Somers <brian@FreeBSD.org> | 2000-08-09 09:23:30 +0000 |
|---|---|---|
| committer | Brian Somers <brian@FreeBSD.org> | 2000-08-09 09:23:30 +0000 |
| commit | 3ebdf3366d1e4bd501df575071acfb4fca134235 (patch) | |
| tree | 49ac93fa6d20daceb729f789b9197ad11f2be0fa | |
| parent | 0edeb3dc90c1121dea6dcf7d1563e0256e9fb487 (diff) | |
Notes
| -rw-r--r-- | etc/rc | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -165,10 +165,12 @@ purgedir() { for dir do ( - cd "$dir" && ls | while read file + cd "$dir" && for file in .* * do - [ -d "$file" ] && purgedir "$file" - [ -f "$file" ] && rm -f "$file" + [ ."$file" = .. -o ."$file" = ... ] && continue + [ -d "$file" -a ! -L "$file" ] && + purgedir "$file" + [ -f "$file" ] && rm -f -- "$file" done ) done |
