From ccd793be0e08ab1aad43b12be848d35f85a42686 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Sat, 1 Jul 2023 16:28:28 -0400 Subject: [PATCH] address comments --- tests/examples/create_diffs.sh | 8 ++++---- tests/examples/update.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/examples/create_diffs.sh b/tests/examples/create_diffs.sh index 515ad3f057..d752616c9f 100755 --- a/tests/examples/create_diffs.sh +++ b/tests/examples/create_diffs.sh @@ -12,10 +12,10 @@ for file in $diff_files; do # Check if the corresponding .cc file exists if [[ -f "$src" ]]; then - echo "creating $file from $src and $filename.cc" - diff "$src" "$filename.cc" > $file + echo "creating $file from $src and $filename.cc" + diff "$src" "$filename.cc" > "$file" else - echo "No matching .cc file found for $diff_file" - exit -1 + echo "No matching .cc file found for $file" + exit 1 fi done diff --git a/tests/examples/update.sh b/tests/examples/update.sh index cede5e4bd4..1211532171 100755 --- a/tests/examples/update.sh +++ b/tests/examples/update.sh @@ -9,13 +9,13 @@ for file in $diff_files; do # Extract the filename without the extension filename=$(basename "$file" .diff) src="../../examples/$filename/$filename.cc" - + # Check if the corresponding .cc file exists if [[ -f "$src" ]]; then # Apply the diff and save it to a new file - patch "$src" < "$file" -o "$filename.cc" + patch "$src" -o "$filename.cc" < "$file" else - echo "No matching .cc file found for $diff_file" - exit -1 + echo "No matching .cc file found for ${file}" + exit 1 fi done -- 2.39.5