updated with new function for compile commands.

This commit is contained in:
jakeg00dwin 2024-03-20 12:47:48 -07:00
parent 0ba7b8d295
commit 6c7907f5c0
1 changed files with 10 additions and 0 deletions

10
otto.sh
View File

@ -10,6 +10,15 @@ TEMPLATE_FILES=".template_files"
MODULE_DIR="${TEMPLATE_FILES}/modules" MODULE_DIR="${TEMPLATE_FILES}/modules"
add_compile_commands () {
if [ -f ./compile_commands.json ]; then
echo "compile_commands.json already exists!\n"
else
echo "Creating new symlink for compile commands!\n"
ln -s ./build/compile_commands.json ./compile_commands.json
fi
}
clear_cmake_cache () { clear_cmake_cache () {
cd ./build cd ./build
rm -rf CMakeCache.txt CMakeFiles/ rm -rf CMakeCache.txt CMakeFiles/
@ -182,6 +191,7 @@ print_menu () {
main() { main() {
add_compile_commands
valid_choice=false valid_choice=false
while [ "$valid_choice" != true ]; do while [ "$valid_choice" != true ]; do