nuclide launch script: if NUCLIDE_GDB is set, run a debug session with gdb

This commit is contained in:
Marco Cawthorne 2021-07-03 15:10:55 +02:00
parent 3f3e61689d
commit d634b35be1
1 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,11 @@ SRCPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )"
cd "$SRCPATH/bin"
if [ -f "$SRCPATH"/bin/fteqw ]; then
./fteqw -basedir ../ $*
if [[ -z "${NUCLIDE_GDB}" ]]; then
./fteqw -basedir ../ $*
else
gdb --args ./fteqw -basedir ../ $*
fi
else
printf "Engine is not present, please run build_engine.sh\n"
fi