Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[pandora-kernel.git] / scripts / gen_initramfs_list.sh
index 41041e4..3eea8f1 100644 (file)
@@ -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