From cd9a30e714808452531b52777bcbe713a89bbce2 Mon Sep 17 00:00:00 2001 From: somebody_master Date: Sun, 12 Feb 2023 01:57:08 +0100 Subject: [PATCH] =?UTF-8?q?Renombrar=20buildGDExtension.sh=20y=20a=C3=B1ad?= =?UTF-8?q?ir=20funci=C3=B3n=20de=20generar=20compile=5Fcommands.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: somebody_master --- build.sh | 27 +++++++++++++++++++++++++++ buildGDExtension.sh | 4 ---- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100755 build.sh delete mode 100755 buildGDExtension.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..4ce5d00 --- /dev/null +++ b/build.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +function build() { + cd gdextension || exit + scons -j 12 + return 1 +} + +function build_db() { + cd gdextension || exit + scons --clean + bear -- scons -j 12 + ln -s compile_commands.json ../ + return 1 +} + +while getopts "bdh:" flag; do + case "$flag" in + d) build_db ;; + b) build ;; + h) echo "Use -b for build or -d for generating a compile_commands.json" ;; + ?) + echo "script usage: $(basename \$0) [-b] [-d] [-h]" >&2 + exit 1 + ;; + esac +done diff --git a/buildGDExtension.sh b/buildGDExtension.sh deleted file mode 100755 index 224640a..0000000 --- a/buildGDExtension.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -cd gdextension || exit -scons -j 12