build(vim-patch.sh): handle added/removed files properly

This commit is contained in:
zeertzjq
2022-10-27 13:38:47 +08:00
parent c41873ab63
commit 9f6502535b

View File

@@ -315,12 +315,11 @@ uncrustify_patch() {
# than once. This is obviously a bug that needs to be fixed on uncrustify's
# end, but in the meantime this workaround is sufficient.
for _ in {1..2}; do
uncrustify -c "$NVIM_SOURCE_DIR"/src/uncrustify.cfg -q --replace --no-backup "$patch_path"/{before,after}/*.[ch]
done
uncrustify -c "$NVIM_SOURCE_DIR"/src/uncrustify.cfg -q --replace --no-backup "$patch_path"/{before,after}/*.[ch]
done
local basename
basename=$(basename "$file")
for file in "${changed_files[@]}"; do
local basename
basename=$(basename "$file")
local before=$patch_path/before/$basename
local after=$patch_path/after/$basename