From b9dcb2cbe55afa21af7eed9f49e319b183954748 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 3 Sep 2007 19:55:09 +0100 Subject: [PATCH] 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 --- cpio.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/cpio.sh b/cpio.sh index 2816e34851..432903813b 100644 --- a/cpio.sh +++ b/cpio.sh @@ -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=- ;;