8 echo "Updates the smatch_data/ directory and builds the smatch database"
13 if [ "$1" = "-h" ] ||
[ "$1" = "--help" ] ; then
17 SCRIPT_DIR
=$
(dirname $0)
18 if [ -e $SCRIPT_DIR/..
/smatch
] ; then
19 CMD
=$SCRIPT_DIR/..
/smatch
20 DATA_DIR
=$SCRIPT_DIR/..
/smatch_data
22 echo "This script should be run from the smatch_scripts/ directory."
26 # If someone is building the database for the first time then make sure all the
27 # required packages are installed
28 if [ ! -e smatch_db.sqlite
] ; then
29 [ -e warns.txt
] ||
touch warns.txt
30 if ! $DATA_DIR/db
/create_db.sh
-p=kernel warns.txt
; then
31 echo "Hm... Not working. Make sure you have all the sqlite3 packages"
32 echo "And the sqlite3 libraries for Perl and Python"
37 $SCRIPT_DIR/test_kernel.sh
--call-tree --info --param-mapper --spammy --data=$DATA_DIR
39 for i
in $SCRIPT_DIR/gen_
* ; do
40 $i warns.txt
-p=kernel
43 mv ${PROJECT}.
* $DATA_DIR
45 $DATA_DIR/db
/create_db.sh
-p=kernel warns.txt