Skip to content

Commit

Permalink
bzip2/lzma: don't leave empty files around on failure
Browse files Browse the repository at this point in the history
Impact: Bugfix, silent build failures

Fix a bug in gen_initramfs_list.sh: in case of failure, it left an
empty output file behind, messing up the next make.

Signed-off-by: Alain Knaff <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
  • Loading branch information
Alain Knaff authored and H. Peter Anvin committed Feb 19, 2009
1 parent e4aa7ca commit ab59d3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/gen_initramfs_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ if [ ! -z ${output_file} ]; then
if [ "${is_cpio_compressed}" = "compressed" ]; then
cat ${cpio_tfile} > ${output_file}
else
cat ${cpio_tfile} | ${compr} - > ${output_file}
(cat ${cpio_tfile} | ${compr} - > ${output_file}) \
|| (rm -f ${output_file} ; false)
fi
[ -z ${cpio_file} ] && rm ${cpio_tfile}
fi
Expand Down

0 comments on commit ab59d3b

Please sign in to comment.