Fix cpio for CR/LF line endings

Under certain circumstances (I did not find out the complete
details, but it happens when running the tests), the filterdirs()
function in cpio outputs CR/LF.  Since tar does not like that,
the command failed.

So strip out all CRs when filtering the directories.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2007-09-03 19:55:09 +01:00
parent 7734ad404c
commit b9dcb2cbe5

View File

@@ -44,6 +44,7 @@ o)
p)
test -z "$null" || die "cpio: cannot use -0 in pass-through mode"
filterdirs |
tr -d '\r' |
tar --create --file=- --files-from=- |
tar --extract --directory="$dir" --file=-
;;