Eliminar la carpeta build de las excepciones de .gitignore
También se mueve build.sh a la carpeta build Signed-off-by: somebody_master <somebody_master@somebodyserver.mooo.com>
This commit is contained in:
0
build/.gdignore
Normal file
0
build/.gdignore
Normal file
39
build/build.sh
Executable file
39
build/build.sh
Executable file
@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function build() {
|
||||
cd gdextension || return 1
|
||||
scons
|
||||
cd ..
|
||||
}
|
||||
|
||||
function build_db() {
|
||||
cd gdextension || return 1
|
||||
scons --clean
|
||||
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
|
||||
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
|
||||
exit 0
|
Reference in New Issue
Block a user