Skip to content
Snippets Groups Projects
Commit ab59d3b7 authored by Alain Knaff's avatar Alain Knaff Committed by H. Peter Anvin
Browse files

bzip2/lzma: don't leave empty files around on failure


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: default avatarAlain Knaff <alain@knaff.lu>
Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent e4aa7ca5
No related branches found
No related tags found
No related merge requests found
...@@ -292,7 +292,8 @@ if [ ! -z ${output_file} ]; then ...@@ -292,7 +292,8 @@ if [ ! -z ${output_file} ]; then
if [ "${is_cpio_compressed}" = "compressed" ]; then if [ "${is_cpio_compressed}" = "compressed" ]; then
cat ${cpio_tfile} > ${output_file} cat ${cpio_tfile} > ${output_file}
else else
cat ${cpio_tfile} | ${compr} - > ${output_file} (cat ${cpio_tfile} | ${compr} - > ${output_file}) \
|| (rm -f ${output_file} ; false)
fi fi
[ -z ${cpio_file} ] && rm ${cpio_tfile} [ -z ${cpio_file} ] && rm ${cpio_tfile}
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment