VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Masahiro Yamada <masahiroy@kernel.org> 2020-01-05 00:02:38 +0900 committer: Masahiro Yamada <masahiroy@kernel.org> 2020-01-16 00:26:22 +0900 commit: 7168965ec7b10b8a2c7dea1f82f1ebadf44d64ba parent: 65e00e04e5aea34b256814cfa21b32e3b94a2402
Commit Summary:
gen_initramfs.sh: remove intermediate cpio_list on errors
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/usr/gen_initramfs.sh b/usr/gen_initramfs.sh
index 4e6715f8ff7f..8ae831657e5d 100755
--- a/usr/gen_initramfs.sh
+++ b/usr/gen_initramfs.sh
@@ -193,6 +193,8 @@ dep_list=
 cpio_list=$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)
 output="/dev/stdout"
 
+trap "rm -f $cpio_list" EXIT
+
 while [ $# -gt 0 ]; do
 	arg="$1"
 	shift
@@ -243,4 +245,3 @@ if test -n "$KBUILD_BUILD_TIMESTAMP"; then
 	fi
 fi
 usr/gen_init_cpio $timestamp $cpio_list > $output
-rm $cpio_list