Don't try restoring a file if no backup is available

This caused `all.sh --force` to fail on a clean build tree.

Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
Gilles Peskine
2022-08-30 21:02:00 +02:00
parent fac3ea5656
commit dd06efbb8d
+3 -1
View File
@@ -314,7 +314,9 @@ cleanup()
# Restore files that may have been clobbered by the job
for x in $files_to_back_up; do
cp -p "$x$backup_suffix" "$x"
if [[ -e "$x$backup_suffix" ]]; then
cp -p "$x$backup_suffix" "$x"
fi
done
}