Añadir soporte para clean

Signed-off-by: somebody_master <somebody_master@somebodyserver.mooo.com>
This commit is contained in:
Somebody Master 2023-02-12 14:08:20 +01:00
parent 7c5d89d711
commit f20e858c2e
Signed by: somebody_master
GPG Key ID: 78315CFDF0B25505

View File

@ -1,5 +1,10 @@
#!/usr/bin/env bash
function clean() {
cd gdextension || return 1
scons --clean
}
function build() {
cd gdextension || return 1
scons
@ -25,13 +30,14 @@ function build_db() {
cd ..
}
while getopts "bdh" flag; do
while getopts "bdch" flag; do
case "$flag" in
d) build_db ;;
b) build ;;
h) echo "Use -b for build or -d for generating a compile_commands.json" ;;
c) clean ;;
h) echo "Use -b for build , -d for generating a compile_commands.json or -c for cleaning" ;;
?)
echo "script usage: $(basename \$0) [-b] [-d] [-h]" >&2
echo "script usage: $(basename \$0) [-b] [-d] [-c] [-h]" >&2
exit 1
;;
esac