Unverified Commit a334a1a5 authored by boklm's avatar boklm
Browse files

Bug 25143: avoid error if output file already exists

If output file or directory already exists, remove it before moving it.
This avoids an error when rebuilding a project that was already built.
parent b068c56f
......@@ -401,7 +401,12 @@ runc:
sudo chown -R $(whoami) "$srcdir"
if [ $(ls -1 "$srcdir"/* 2> /dev/null | wc -l) -gt 0 ]
then
mv -f "$srcdir"/* [% dst %]/
for file in "$srcdir"/*
do
bname="$(basename "$file")"
test -e [% dst %]/"$bname" && rm -Rf [% dst %]/"$bname"
mv -f "$file" [% dst %]/
done
fi
remote_finish: |
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment