]> arthur.barton.de Git - bup.git/blob - t/lib.sh
e8e526812eee939e288595039b99c25b6b6ed5ee
[bup.git] / t / lib.sh
1
2 force-delete()
3 {
4     # Try *hard* to delete $@.  Among other things, some systems have
5     # r-xr-xr-x for root and other system dirs.
6     rm -rf "$@" # Maybe we'll get lucky.
7     for f in "$@"; do
8         test -e "$@" || continue
9         chmod -R u+w "$@"
10         if [[ $(uname) =~ Linux ]]; then
11             chattr -fR = "$@"
12             setfacl -Rb "$@"
13         fi
14         rm -r "$@"
15         if test -e "$@"; then
16             return 1
17         fi
18     done
19 }