From 6c7907f5c067830205d8d8cda0a37a7c85d63a98 Mon Sep 17 00:00:00 2001 From: jakeg00dwin Date: Wed, 20 Mar 2024 12:47:48 -0700 Subject: [PATCH] updated with new function for compile commands. --- otto.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/otto.sh b/otto.sh index bd545c6..1575b3d 100755 --- a/otto.sh +++ b/otto.sh @@ -10,6 +10,15 @@ TEMPLATE_FILES=".template_files" 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 () { cd ./build rm -rf CMakeCache.txt CMakeFiles/ @@ -182,6 +191,7 @@ print_menu () { main() { + add_compile_commands valid_choice=false while [ "$valid_choice" != true ]; do