silence bogus "unreachable code" warnings
[smatch.git] / smatch_scripts / db / create_db.sh
blobb9a64323e858f631ea6687d70061c8b91f67fca1
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 $info_file
26 done
28 if [ "$PROJ" != "" ] ; then
29 ${bin_dir}/fixup_${PROJ}.sh