From: Rudolf Polzer Date: Thu, 14 Jun 2012 08:25:03 +0000 (+0200) Subject: ./all run dedicated: use rlwrap if available X-Git-Tag: xonotic-v0.7.0~54^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5c73f1188bd25a17be909ac61c456ec5cde62902;p=xonotic%2Fxonotic.git ./all run dedicated: use rlwrap if available --- diff --git a/misc/tools/all/xonotic.subr b/misc/tools/all/xonotic.subr index e18d7fe2..fc6a498d 100644 --- a/misc/tools/all/xonotic.subr +++ b/misc/tools/all/xonotic.subr @@ -244,11 +244,17 @@ case "$cmd" in client=-sdl fi case "$1" in - sdl|glx|agl|dedicated) + dedicated) + client=-$1 + shift + ;; + sdl|glx|agl) + USE_RLWRAP=no client=-$1 shift ;; wgl) + USE_RLWRAP=no client= shift ;; @@ -276,11 +282,16 @@ case "$cmd" in if [ x"$USE_GDB" = x"yes" ]; then set -- gdb --args "$@" - elif [ x"$USE_GDB" = x"core" ] && which gdb >/dev/null 2>&1; then + USE_RLWRAP=no + elif [ x"$USE_GDB" = x"core" ]; then set -- gdb --batch -x savecore.gdb --args "$@" + USE_RLWRAP=no elif which catchsegv >/dev/null 2>&1; then set -- catchsegv "$@" fi + if [ x"$USE_RLWRAP" != x"no" ] && which rlwrap >/dev/null 2>&1; then + set -- rlwrap -A -g '^quit' -q "\"" -r -S ']' -w 100 "$@" + fi rm -f xonotic.core "$@" || true if [ -f xonotic.core ]; then