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