2 # make sure du's --exclude option works
4 if test "$VERBOSE" = yes; then
10 t0
=`echo "$0"|sed 's,.*/,,'`.tmp
; tmp
=$t0/$$
11 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
12 trap '(exit $?); exit $?' 1 2 13 15
15 mkdir
-p $tmp || framework_failure
=1
16 cd $tmp || framework_failure
=1
17 mkdir
-p a
/b
/c a
/x
/y a
/u
/v
19 if test $framework_failure = 1; then
20 echo "$0: failure in testing framework" 1>&2
26 du
--exclude=x a |
sed 's/^[0-9][0-9]* //' |
sort > out || fail
=1
29 du
--exclude-from=excl a |
sed 's/^[0-9][0-9]* //' |
sort >> out || fail
=1
31 # Make sure that we can exclude an entire hierarchy.
32 du
--exclude=a a
>> out || fail
=1
49 test $fail = 1 && diff out exp
2> /dev
/null
51 (exit $fail); exit $fail