mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
scripts: Do not patch already patched sources in patch mode
Also do not patch header files, that is not needed.
This commit is contained in:
parent
38b2bc9a88
commit
9fd048d901
@ -15,6 +15,7 @@ help() {
|
|||||||
echo ' pvscheck.sh --patch'
|
echo ' pvscheck.sh --patch'
|
||||||
echo
|
echo
|
||||||
echo ' --patch: patch sources in the current directory.'
|
echo ' --patch: patch sources in the current directory.'
|
||||||
|
echo ' Does not patch already patched files.'
|
||||||
echo ' Does not run analysis.'
|
echo ' Does not run analysis.'
|
||||||
echo
|
echo
|
||||||
echo ' --recheck: run analysis on a prepared target directory.'
|
echo ' --recheck: run analysis on a prepared target directory.'
|
||||||
@ -66,18 +67,22 @@ patch_sources() {
|
|||||||
get_pvs_comment
|
get_pvs_comment
|
||||||
|
|
||||||
local sh_script='
|
local sh_script='
|
||||||
cat pvs-comment "$1" > "$1.tmp"
|
pvs_comment="$(cat pvs-comment ; echo -n EOS)"
|
||||||
mv "$1.tmp" "$1"
|
filehead="$(head -c $(( ${#pvs_comment} - 3 )) "$1" ; echo -n EOS)"
|
||||||
|
if test "x$filehead" != "x$pvs_comment" ; then
|
||||||
|
cat pvs-comment "$1" > "$1.tmp"
|
||||||
|
mv "$1.tmp" "$1"
|
||||||
|
fi
|
||||||
'
|
'
|
||||||
|
|
||||||
find \
|
find \
|
||||||
src/nvim test/functional/fixtures test/unit/fixtures \
|
src/nvim test/functional/fixtures test/unit/fixtures \
|
||||||
-name '*.[ch]' \
|
-name '*.c' \
|
||||||
-exec /bin/sh -c "$sh_script" - '{}' \;
|
-exec /bin/sh -c "$sh_script" - '{}' \;
|
||||||
|
|
||||||
find \
|
find \
|
||||||
build/src/nvim/auto build/config \
|
build/src/nvim/auto build/config \
|
||||||
-name '*.[ch]' -not -name '*.test-include.c' \
|
-name '*.c' -not -name '*.test-include.c' \
|
||||||
-exec /bin/sh -c "$sh_script" - '{}' \;
|
-exec /bin/sh -c "$sh_script" - '{}' \;
|
||||||
|
|
||||||
rm pvs-comment
|
rm pvs-comment
|
||||||
|
Loading…
Reference in New Issue
Block a user