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