Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54146
b: refs/heads/master
c: c299ec2
h: refs/heads/master
v: v3
  • Loading branch information
Alex Landau authored and Sam Ravnborg committed May 2, 2007
1 parent e339376 commit b86394f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4d5171ac7d9806b1ea61903ff954cd9620135bf
refs/heads/master: c299ec2d8e8d2f1a99d5c993fca485257b950d40
10 changes: 8 additions & 2 deletions trunk/scripts/gen_initramfs_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@ input_file() {
source="$1"
if [ -f "$1" ]; then
${dep_list}header "$1"
is_cpio="$(echo "$1" | sed 's/^.*\.cpio/cpio/')"
is_cpio="$(echo "$1" | sed 's/^.*\.cpio\(\..*\)\?/cpio/')"
if [ $2 -eq 0 -a ${is_cpio} == "cpio" ]; then
cpio_file=$1
echo "$1" | grep -q '^.*\.cpio\..*' && is_cpio_compressed="compressed"
[ ! -z ${dep_list} ] && echo "$1"
return 0
fi
Expand Down Expand Up @@ -223,6 +224,7 @@ cpio_file=
cpio_list=
output="/dev/stdout"
output_file=""
is_cpio_compressed=

arg="$1"
case "$arg" in
Expand Down Expand Up @@ -282,7 +284,11 @@ if [ ! -z ${output_file} ]; then
cpio_tfile=${cpio_file}
fi
rm ${cpio_list}
cat ${cpio_tfile} | gzip -f -9 - > ${output_file}
if [ "${is_cpio_compressed}" = "compressed" ]; then
cat ${cpio_tfile} > ${output_file}
else
cat ${cpio_tfile} | gzip -f -9 - > ${output_file}
fi
[ -z ${cpio_file} ] && rm ${cpio_tfile}
fi
exit 0

0 comments on commit b86394f

Please sign in to comment.