mirror of
https://github.com/glest/glest-source.git
synced 2025-08-24 17:02:49 +02:00
- update cppcheck script to install cppcheck if missing and check multiple paths for cfg file
This commit is contained in:
@@ -4,12 +4,23 @@
|
|||||||
# Written by Mark Vejvoda <mark_vejvoda@hotmail.com>
|
# Written by Mark Vejvoda <mark_vejvoda@hotmail.com>
|
||||||
# Copyright (c) 2011 Mark Vejvoda under GNU GPL v3.0+
|
# Copyright (c) 2011 Mark Vejvoda under GNU GPL v3.0+
|
||||||
|
|
||||||
|
if ! cppcheck_loc="$(type -p "cppcheck")" || [ -z "$cppcheck_loc" ]; then
|
||||||
|
# install foobar here
|
||||||
|
echo "CPPCHECK is not installed, installing now..."
|
||||||
|
sudo apt install cppcheck
|
||||||
|
fi
|
||||||
|
|
||||||
# (Actual) Location of the cppcheck binary
|
# (Actual) Location of the cppcheck binary
|
||||||
CPPCHECK=$(readlink -f $(which cppcheck))
|
CPPCHECK=$(readlink -f $(which cppcheck))
|
||||||
|
|
||||||
# cppcheck now depends on this library (see 'cppcheck --help' for the '--library' option)
|
# cppcheck now depends on this library (see 'cppcheck --help' for the '--library' option)
|
||||||
# If you use the Debian / Ubuntu package set this to: /usr/share/cppcheck/cfg/std.cfg
|
# If you use the Debian / Ubuntu package set this to: /usr/share/cppcheck/cfg/std.cfg
|
||||||
CPPCHECKLIB=$(dirname $CPPCHECK)/cfg/std.cfg
|
if [ -e "$(dirname $CPPCHECK)/cfg/std.cfg" ]; then
|
||||||
|
CPPCHECKLIB=$(dirname $CPPCHECK)/cfg/std.cfg
|
||||||
|
elif [ -e "/usr/share/cppcheck/cfg/std.cfg" ]; then
|
||||||
|
CPPCHECKLIB=/usr/share/cppcheck/cfg/std.cfg
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# File to write results to
|
# File to write results to
|
||||||
LOGFILE=/tmp/cppcheck.log
|
LOGFILE=/tmp/cppcheck.log
|
||||||
|
Reference in New Issue
Block a user