From 3b0cfcda3c4636175215abb10de09bdbbe1ae4f5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 14 Jun 2025 16:02:23 +0200 Subject: [PATCH] always copy script if it doesn't exist yet at destination --- install_scripts.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install_scripts.sh b/install_scripts.sh index f4863686..9a9dd795 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -49,8 +49,12 @@ compare_and_copy() { if [ ! -f "$destination_file" ] || ! diff -q "$source_file" "$destination_file" ; then echo "Files $source_file and $destination_file differ, checking if we should copy or not" # We only copy if the file is part of the PR - if file_changed_in_pr "$source_file"; then - echo "File has changed in the PR" + if [ ! -f "${destination_file}" ] || file_changed_in_pr "$source_file"; then + if [ ! -f "${destination_file}" ]; then + echo "File has not been copied yet ($destination_file does not exist}" + else + echo "File has changed in the PR" + fi cp "$source_file" "$destination_file" echo "File $source_file copied to $destination_file" else