Files
azerothcore-wotlk/bin/runners/starter
2016-08-26 16:23:25 +02:00

22 lines
478 B
Bash
Executable File

#!/usr/bin/env bash
GDB_FILE="$2"
CONFIG="$3"
SYSLOG="$4"
SYSERR="$5"
GBD_ENABLED="$6"
if [ $GBD_ENABLED -eq 1 ]; then
echo "set logging on" > "$GDB_FILE"
echo "set debug timestamp" >> "$GDB_FILE"
echo "run -c $3" >> "$GDB_FILE"
echo "bt" >> "$GDB_FILE"
[ ! -f "$SYSLOG" ] && touch "$SYSLOG"
[ ! -f "$SYSERR" ] && touch "$SYSERR"
gdb -x $GDB_FILE --batch $1 >> "$SYSLOG" 2>> "$SYSERR"
elif [ $GBD_ENABLED -eq 0 ]; then
"./$1" -c "$CONFIG"
fi