From 5c73f1188bd25a17be909ac61c456ec5cde62902 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 14 Jun 2012 10:25:03 +0200 Subject: [PATCH] ./all run dedicated: use rlwrap if available --- misc/tools/all/xonotic.subr | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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 -- 2.39.2