mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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: Alain Knaff <alain@knaff.lu> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
committed by
H. Peter Anvin
parent
e4aa7ca5a2
commit
ab59d3b70f
@@ -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
|
||||||
|
Reference in New Issue
Block a user