diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2018-03-18 11:31:07 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2018-03-18 12:34:08 -0400 |
commit | 3edbc453a86f10ddcc9fc5d2535aff07b40d2f8e (patch) | |
tree | 203064921f65c693eb588a197edef39a2ff27851 /tests.sh | |
parent | f1216d4f9448225e145438477b9b1c2556744d64 (diff) | |
download | bfs-3edbc453a86f10ddcc9fc5d2535aff07b40d2f8e.tar.xz |
tests: Work around broken rm in cleanup
BusyBox rm, for example, doesn't handle long paths properly, so give it
some help.
C.f. http://lists.busybox.net/pipermail/busybox/2018-March/086302.html
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -33,6 +33,13 @@ function cleanup() { return fi + # Don't force rm to deal with long paths + for dir in "$TMP"/deep/*/*; do + if [ -d "$dir" ]; then + (cd "$dir" && rm -rf *) + fi + done + rm -rf "$TMP" } trap cleanup EXIT |