1 # Assumes shell is Bash, and pipefail is set.
3 bup_t_lib_script_home=$(cd "$(dirname $0)" && pwd)
8 # Try *hard* to delete $@. Among other things, some systems have
9 # r-xr-xr-x for root and other system dirs.
10 rm -rf "$@" # Maybe we'll get lucky.
12 test -e "$f" || continue
13 if test "$(type -p setfacl)"; then
16 if test "$(type -p chattr)"; then
33 test "$#" -eq 1 || return $?
35 PYTHONPATH="$bup_t_lib_script_home/../lib" python -c \
36 "import sys, bup.helpers; print bup.helpers.realpath(sys.stdin.readline())" \
42 local kernel="$(uname -s)" || return $?
45 df -G . | sed -En 's/.* ([^ ]*) fstype.*/\1/p'
48 df -g . | sed -En 's/.* ([^ ]*) fstype.*/\1/p'
51 df -T . | awk 'END{print $2}'
57 # Return filesystem for each dir from $1 to /.
58 # Perhaps for /foo/bar, "ext4\next4\nbtrfs\n".
59 test "$#" -eq 1 || exit $?
61 current-filesystem || exit $?
62 dir="$(pwd)" || exit $?
63 while test "$dir" != /; do
65 dir="$(pwd)" || exit $?
66 current-filesystem || exit $?