Skip to content

always copy script if it doesn't exist yet at destination #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions install_scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down