*new* add smatch_data/kernel.silenced_functions to silence common noise
[smatch.git] / smatch_data / db / create_db.sh
blobaae37a31e96bdc70d6768a560a5743b56454e0dd
1 #!/bin/bash
3 if echo $1 | grep -q '^-p' ; then
4 PROJ=$(echo $1 | cut -d = -f 2)
5 shift
6 fi
8 info_file=$1
10 if [[ "$info_file" = "" ]] ; then
11 echo "Usage: $0 -p=<project> <file with smatch messages>"
12 exit 1
15 bin_dir=$(dirname $0)
16 db_file=smatch_db.sqlite
18 rm -f $db_file
20 for i in ${bin_dir}/*.schema ; do
21 cat $i | sqlite3 $db_file
22 done
24 for i in ${bin_dir}/fill_* ; do
25 $i "$PROJ" $info_file
26 done
28 ${bin_dir}/fixup_all.sh
29 if [ "$PROJ" != "" ] ; then
30 ${bin_dir}/fixup_${PROJ}.sh