merge_helpers.sh: Allow restoring upstream files deleted downstream

Change-Id: Ib02d37f4c5e2414b04e5fdf6006e6e3c13f4827a
This commit is contained in:
SpiritCroc 2021-09-11 10:01:11 +02:00
parent 75a9c748af
commit 4803fbbc05
1 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,9 @@ restore_upstream() {
local path="$(dirname "$1")"
local sc_f="tmp_sc_$f"
local upstream_f="upstream_$f"
mv "$path/$f" "$path/$sc_f"
if [ -e "$path/$f" ]; then
mv "$path/$f" "$path/$sc_f"
fi
if [ -e "$path/$upstream_f" ]; then
mv "$path/$upstream_f" "$path/$f"
fi