diff options
author | Ben Brown <ben.brown@codethink.co.uk> | 2013-12-17 17:31:46 +0000 |
---|---|---|
committer | Ben Brown <ben.brown@codethink.co.uk> | 2013-12-18 16:57:34 +0000 |
commit | 1d7bbf4e3a75a6be688090c9b06e11fca849cdce (patch) | |
tree | 82556fbc1e12c9e8ae5e38efed898db631e06853 /yarns/tbdiff.shell-lib | |
parent | 7852c2e999d15262aef744eeef4f52ed4cdc4334 (diff) | |
download | tbdiff-1d7bbf4e3a75a6be688090c9b06e11fca849cdce.tar.gz |
Scenarios testing extended attributes on file systems that support them
Diffstat (limited to 'yarns/tbdiff.shell-lib')
-rw-r--r-- | yarns/tbdiff.shell-lib | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/yarns/tbdiff.shell-lib b/yarns/tbdiff.shell-lib index 658efe6..33d9954 100644 --- a/yarns/tbdiff.shell-lib +++ b/yarns/tbdiff.shell-lib @@ -12,3 +12,13 @@ export SRCDIR="$(pwd)" fi } + +# Test that the extended attributes of two files are the same by comparing the +# output of `getfattr -d` on each file, which has been piped to `tail -n +2` in +# order to skip the first line of output, being the file name. + +compare_xattrs() +{ + test \ + "$(getfattr -d "$1" | tail -n +2)" = "$(getfattr -d "$2" | tail -n +2)" +} |