From 792bff030b682cb886f3b2fb5a03e8038d730e3a Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 18 May 2023 09:10:50 -0400 Subject: [PATCH] Stop deletion of patch file if it doesn't exist --- functions/patching.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/patching.sh b/functions/patching.sh index 9d4ec3c6..84fa4312 100644 --- a/functions/patching.sh +++ b/functions/patching.sh @@ -267,7 +267,9 @@ generate_single_patch() { local patch_file="$3" local system="$4" - rm "$patch_file" # Remove old patch file (maybe change this to create a backup instead?) + if [[ -f "$patch_file" ]]; then + rm "$patch_file" # Remove old patch file (maybe change this to create a backup instead?) + fi while read -r current_setting_line; # Look for changes from the original file to the modified one do