Skip to content

Commit 3b0cfcd

Browse files
committed
always copy script if it doesn't exist yet at destination
1 parent a621ae5 commit 3b0cfcd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

install_scripts.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,12 @@ compare_and_copy() {
4949
if [ ! -f "$destination_file" ] || ! diff -q "$source_file" "$destination_file" ; then
5050
echo "Files $source_file and $destination_file differ, checking if we should copy or not"
5151
# We only copy if the file is part of the PR
52-
if file_changed_in_pr "$source_file"; then
53-
echo "File has changed in the PR"
52+
if [ ! -f "${destination_file}" ] || file_changed_in_pr "$source_file"; then
53+
if [ ! -f "${destination_file}" ]; then
54+
echo "File has not been copied yet ($destination_file does not exist}"
55+
else
56+
echo "File has changed in the PR"
57+
fi
5458
cp "$source_file" "$destination_file"
5559
echo "File $source_file copied to $destination_file"
5660
else

0 commit comments

Comments
 (0)