aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlain Knaff <alain@knaff.lu>2009-02-19 16:39:21 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2009-02-19 16:39:21 -0500
commitab59d3b70f7a47987f80e153d828363faec643fe (patch)
tree67fd838d91444de13ca5487313f6979cc401345e /scripts
parente4aa7ca5a2e6d44f07ceb87d9448113f5b48a334 (diff)
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gen_initramfs_list.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
index 41041e4923f7..3eea8f15131b 100644
--- a/scripts/gen_initramfs_list.sh
+++ b/scripts/gen_initramfs_list.sh
@@ -292,7 +292,8 @@ if [ ! -z ${output_file} ]; then
292 if [ "${is_cpio_compressed}" = "compressed" ]; then 292 if [ "${is_cpio_compressed}" = "compressed" ]; then
293 cat ${cpio_tfile} > ${output_file} 293 cat ${cpio_tfile} > ${output_file}
294 else 294 else
295 cat ${cpio_tfile} | ${compr} - > ${output_file} 295 (cat ${cpio_tfile} | ${compr} - > ${output_file}) \
296 || (rm -f ${output_file} ; false)
296 fi 297 fi
297 [ -z ${cpio_file} ] && rm ${cpio_tfile} 298 [ -z ${cpio_file} ] && rm ${cpio_tfile}
298fi 299fi