From 67d68178c6d61023f623fe77688d495b538fc2fb Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 20 Jan 2014 14:35:24 +0100 Subject: [PATCH] gen_cpio fixes --- contrib/gen_cpio | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/gen_cpio b/contrib/gen_cpio index ea7b527..40424f1 100755 --- a/contrib/gen_cpio +++ b/contrib/gen_cpio @@ -177,7 +177,7 @@ gen_filelist() { echo "dir $dir 0755 0 0" dir=$(dirname $dir) done - echo "$(filetype $src) $dst $src $(find $src -printf '%m') 0 0" + echo "file $dst $src $(find $src -printf '%m') 0 0" } while [ $# -gt 0 ]; do @@ -195,13 +195,13 @@ while [ $# -gt 0 ]; do *"->"*) src=${arg%%->*} dst=${arg#*->} - cpio_list="$cpio_list$(gen_filelist $src $dst)" + cpio_list=$(echo "$cpio_list"; gen_filelist $src $dst) ;; *) if [ -d "$arg" ]; then cpio_list="$cpio_list$(gen_dirlist $arg)" elif [ -f "$arg" ]; then - case "$(file $arg)" in + case "$(file -L $arg)" in *"cpio archive"*) gen_cpio_from_list cat $arg -- 2.39.2