3 # Emulates some cpio behavior using GNU tar
12 while test $# -gt 0; do
22 *) die
"cpio emulation supports only -0, -o, -iuv, -pumdl";;
32 # list only empty directories
33 # here we assume that directories are listed after
34 # its files (aka 'find -depth'), hence, a directory
35 # that is not empty will be a leading sub-string
36 # of the preceding entry
50 tar --create --file=- $null --files-from=-
53 test -z "$null" || die
"cpio: cannot use -0 in pass-through mode"
55 tar --create --file=- --files-from=- |
56 tar --extract --directory="$dir" --file=-