mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
build(vim-patch.sh): use bundled uncrustify (#23770)
This commit is contained in:
parent
a24dd0392b
commit
d3a22ff242
@ -297,7 +297,7 @@ uncrustify_patch() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
local patch_path=$NVIM_SOURCE_DIR/build/vim_patch
|
||||
local patch_path="$NVIM_SOURCE_DIR"/build/vim_patch
|
||||
rm -rf "$patch_path"
|
||||
mkdir -p "$patch_path"/{a,b}
|
||||
|
||||
@ -314,7 +314,7 @@ 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"/{a,b}/src/*.[ch]
|
||||
"$NVIM_SOURCE_DIR"/build/usr/bin/uncrustify -c "$NVIM_SOURCE_DIR"/src/uncrustify.cfg -q --replace --no-backup "$patch_path"/{a,b}/src/*.[ch]
|
||||
done
|
||||
|
||||
(cd "$patch_path" && (git --no-pager diff --no-index --no-prefix --patch --unified=5 --color=never a/ b/ || true))
|
||||
@ -328,7 +328,7 @@ get_vimpatch() {
|
||||
msg_ok "Found Vim revision '${vim_commit}'."
|
||||
|
||||
local patch_content
|
||||
if check_executable uncrustify; then
|
||||
if check_executable "$NVIM_SOURCE_DIR"/build/usr/bin/uncrustify; then
|
||||
patch_content="$(uncrustify_patch "${vim_commit}")"
|
||||
else
|
||||
patch_content="$(git --no-pager show --unified=5 --color=never -1 --pretty=medium "${vim_commit}")"
|
||||
|
Loading…
Reference in New Issue
Block a user