Commit ab59d3b70f7a47987f80e153d828363faec643fe
Committed by
H. Peter Anvin
1 parent
e4aa7ca5a2
Exists in
master
and in
39 other branches
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>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
scripts/gen_initramfs_list.sh
... | ... | @@ -292,7 +292,8 @@ |
292 | 292 | if [ "${is_cpio_compressed}" = "compressed" ]; then |
293 | 293 | cat ${cpio_tfile} > ${output_file} |
294 | 294 | else |
295 | - cat ${cpio_tfile} | ${compr} - > ${output_file} | |
295 | + (cat ${cpio_tfile} | ${compr} - > ${output_file}) \ | |
296 | + || (rm -f ${output_file} ; false) | |
296 | 297 | fi |
297 | 298 | [ -z ${cpio_file} ] && rm ${cpio_tfile} |
298 | 299 | fi |