aboutsummaryrefslogtreecommitdiff
path: root/scripts/pvscheck.sh
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-05-20 03:35:50 +0300
committerZyX <kp-pav@yandex.ru>2017-05-20 03:35:50 +0300
commitd72df05b930c7dd79f138ec371124329eb9c9259 (patch)
tree3cc302c8aca0167aa88622770f70161d488186f2 /scripts/pvscheck.sh
parenta914029278ef1920833423e04a89b07339c1354f (diff)
downloadrneovim-d72df05b930c7dd79f138ec371124329eb9c9259.tar.gz
rneovim-d72df05b930c7dd79f138ec371124329eb9c9259.tar.bz2
rneovim-d72df05b930c7dd79f138ec371124329eb9c9259.zip
pvscheck: Add --only-analyse mode
Diffstat (limited to 'scripts/pvscheck.sh')
-rwxr-xr-xscripts/pvscheck.sh25
1 files changed, 17 insertions, 8 deletions
diff --git a/scripts/pvscheck.sh b/scripts/pvscheck.sh
index c75dd2ab76..79ed08f458 100755
--- a/scripts/pvscheck.sh
+++ b/scripts/pvscheck.sh
@@ -14,7 +14,7 @@ get_jobs_num() {
help() {
echo 'Usage:'
echo ' pvscheck.sh [--pvs URL] [--deps] [target-directory [branch]]'
- echo ' pvscheck.sh [--pvs URL] [--recheck] [target-directory]'
+ echo ' pvscheck.sh [--pvs URL] [--recheck|--only-analyse] [target-directory]'
echo ' pvscheck.sh [--pvs URL] --pvs-install {target-directory}'
echo ' pvscheck.sh --patch [--only-build]'
echo
@@ -39,6 +39,9 @@ help() {
echo
echo ' --recheck: run analysis on a prepared target directory.'
echo
+ echo ' --only-analyse: run analysis on a prepared target directory '
+ echo ' without building Neovim.'
+ echo
echo ' target-directory: Directory where build should occur.'
echo ' Default: ../neovim-pvs'
echo
@@ -348,20 +351,23 @@ do_check() {
install_pvs "$tgt" "$pvs_url"
- adjust_path "$tgt"
+ do_recheck "$tgt" "$deps"
+}
+
+do_recheck() {
+ local tgt="$1" ; shift
+ local deps="$2" ; shift
create_compile_commands "$tgt" "$deps"
- run_analysis "$tgt"
+ do_analysis "$tgt"
}
-do_recheck() {
- local tgt="$1"
+do_analysis() {
+ local tgt="$1" ; shift
adjust_path "$tgt"
- create_compile_commands "$tgt" "$deps"
-
run_analysis "$tgt"
}
@@ -384,6 +390,7 @@ main() {
patch store_const \
only-build 'store_const --only-build' \
recheck store_const \
+ only-analyse store_const \
pvs-install store_const \
deps store_const \
-- \
@@ -404,7 +411,9 @@ main() {
elif test -n "$pvs_install" ; then
install_pvs "$tgt" "$pvs_url"
elif test -n "$recheck" ; then
- do_recheck "$tgt"
+ do_recheck "$tgt" "$deps"
+ elif test -n "$only_analyse" ; then
+ do_analysis "$tgt"
else
do_check "$tgt" "$branch" "$pvs_url" "$deps"
fi