From 1f1fce0dc7847ef87078fe473a6632f7d41bc97c Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Thu, 20 Jul 2023 11:04:26 +0200 Subject: [PATCH] ansible-boilerplate: Only create ".new" files when called with the "init" subcommand Don't create ".new" files on "upgrade"! --- bin/ansible-boilerplate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ansible-boilerplate b/bin/ansible-boilerplate index 9d5fc21..3d089a1 100755 --- a/bin/ansible-boilerplate +++ b/bin/ansible-boilerplate @@ -261,7 +261,7 @@ Upgrade_Template() { # Do not override the target when it exists already! if [ -e "$1" ]; then # Target already exists. Is it different? - if ! cmp "$1" "${BASE_D}/$1"; then + if [ "$2" = "--init" ] && ! cmp "$1" "${BASE_D}/$1"; then # Files are not the same! Install new version in parallel: install -b -m 0644 -p -v "${BASE_D}/$1" "$1.new" fi -- 2.39.2