diff mbox series

[v3,2/2] kheaders: use standard naming for the temporary directory

Message ID 20230117-kernel-kheaders-gitignore-v3-2-e686b93b0732@weissschuh.net (mailing list archive)
State New, archived
Headers show
Series kheaders: use standard naming for the temporary directory | expand

Commit Message

Thomas Weißschuh Jan. 18, 2023, 5:05 a.m. UTC
If the kheaders archive generation is interrupted then this directory
may be left on disk and not ignored by git.
By using the standard naming schema for temporary files and directories
the default .gitignore and "make clean" rules will apply.

Suggested-by: Nicolas Schier <nicolas@fjasle.eu>
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 kernel/gen_kheaders.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nicolas Schier Jan. 18, 2023, 7:55 a.m. UTC | #1
On Wed 18 Jan 2023 05:05:35 GMT, Thomas Weißschuh wrote:
> If the kheaders archive generation is interrupted then this directory
> may be left on disk and not ignored by git.
> By using the standard naming schema for temporary files and directories
> the default .gitignore and "make clean" rules will apply.
> 
> Suggested-by: Nicolas Schier <nicolas@fjasle.eu>
> Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
>  kernel/gen_kheaders.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh
> index 473036b43c83..b477b763f262 100755
> --- a/kernel/gen_kheaders.sh
> +++ b/kernel/gen_kheaders.sh
> @@ -7,7 +7,7 @@ set -e
>  sfile="$(readlink -f "$0")"
>  outdir="$(pwd)"
>  tarfile=$1
> -cpio_dir=$outdir/$tarfile.tmp
> +cpio_dir=$outdir/${tarfile%/*}/.tmp_cpio_dir
>  
>  dir_list="
>  include/
> 
> -- 
> 2.39.1

Thanks!

Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Nicolas Schier <nicolas@fjasle.eu>
diff mbox series

Patch

diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh
index 473036b43c83..b477b763f262 100755
--- a/kernel/gen_kheaders.sh
+++ b/kernel/gen_kheaders.sh
@@ -7,7 +7,7 @@  set -e
 sfile="$(readlink -f "$0")"
 outdir="$(pwd)"
 tarfile=$1
-cpio_dir=$outdir/$tarfile.tmp
+cpio_dir=$outdir/${tarfile%/*}/.tmp_cpio_dir
 
 dir_list="
 include/