Files
codeql-workshop-dataflow-c/build-databases.sh
Nikita Kraiouchkine 850d9d296a Initial commit
2023-04-17 10:27:44 +02:00

16 lines
442 B
Bash
Executable File

#!/bin/sh
[[ $(git rev-parse --show-toplevel) == $(pwd) ]] || {
echo "This script must be run from the root of the workshop repository."
exit 1
}
for i in {1..3}; do
SRCDIR=$(pwd)/tests-common
DB=$(pwd)/cpp-dataflow-part$i-database
echo $DB
test -d "$DB" && rm -fR "$DB"
mkdir -p "$DB"
codeql database create --language=cpp -s "$SRCDIR" -j 8 -v $DB --command="clang -fsyntax-only $SRCDIR/test_part$i.c"
done