From 823682144a3c2540c8a511d25dfbf2fbdc129f61 Mon Sep 17 00:00:00 2001 From: somebody_master Date: Sun, 12 Feb 2023 12:47:25 +0100 Subject: [PATCH] =?UTF-8?q?Arreglar=20la=20generaci=C3=B3n=20de=20compile?= =?UTF-8?q?=5Fcommands.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: somebody_master --- build.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/build.sh b/build.sh index 4ce5d00..9d9e303 100755 --- a/build.sh +++ b/build.sh @@ -1,17 +1,28 @@ #!/usr/bin/env bash function build() { - cd gdextension || exit - scons -j 12 - return 1 + cd gdextension || return 1 + scons + cd .. } function build_db() { - cd gdextension || exit + cd gdextension || return 1 scons --clean - bear -- scons -j 12 - ln -s compile_commands.json ../ - return 1 + bear -- scons + + if [ ! -d ../build ]; then + mkdir ../build + touch ../build/.gdignore + fi + + if [ -f ../build/compile_commands.json ]; then + rm ../build/compile_commands.json + fi + + cp compile_commands.json ../build/ + + cd .. } while getopts "bdh:" flag; do @@ -25,3 +36,4 @@ while getopts "bdh:" flag; do ;; esac done +exit 0