File indexing completed on 2024-11-17 05:06:40
0001 #!/bin/bash 0002 # 0003 # Given a path to a codebase, this script creates a database in that folder, 0004 # running CMake as needed to generate the compile commands. Primarily written 0005 # for use in docker containers but can be used manually. 0006 0007 CODEBASE_PATH="${CODEBASE_PATH:-/codebase}" 0008 BUILD_PATH="${BUILD_PATH:-$CODEBASE_PATH/build}" 0009 PARSER_EXECUTABLE="${PARSER_EXECUTABLE:-create_codebase_db}" 0010 0011 sed -i.host "s/${CODEBASE_EXT_PATH//\//\\/}/${CODEBASE_PATH////\\/}/g" "${BUILD_PATH}/compile_commands.json" 0012 0013 cd "$CODEBASE_PATH" || { echo "invalid folder"; exit 1; } 0014 0015 # "$PARSER_EXECUTABLE" \ 0016 # --update \ 0017 # --silent \ 0018 # -j "$(nproc)" \ 0019 # --ignore "*.t.cpp" \ 0020 # --ignore "*standalone*" \ 0021 # "$CODEBASE_PATH/database.db" \ 0022 # "$BUILD_PATH/compile_commands.json" 0023 0024 echo "Ignoring this temporarely untill Soci is the default."