Guard against the deletion of files that are already deleted
On a second run where the first run was partially completed, the deleted files might not exist anymore. This change guards against trying to delete such files.
This commit is contained in:
parent
43d5183147
commit
70c1ab4ca2
1 changed files with 4 additions and 2 deletions
|
@ -9,8 +9,10 @@ __install_update() {
|
|||
ch_files=$(git diff --name-only --diff-filter=RAM "$rev"..HEAD | \
|
||||
cut -d / -f1 -f2 | uniq)
|
||||
for file in $rm_files; do
|
||||
echo RM "$ports_dir/$file"
|
||||
rm "$ports_dir/$file"
|
||||
if [ -e "$ports_dir/$file" ]; then
|
||||
echo RM "$ports_dir/$file"
|
||||
rm "$ports_dir/$file"
|
||||
fi;
|
||||
done
|
||||
for file in $ch_files; do
|
||||
if [ -f "$file" ]; then
|
||||
|
|
Loading…
Reference in a new issue