From 69631769f815402364c9dc1968cf3f00e1c8f2e9 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 31 Dec 2024 00:08:18 -0500 Subject: [PATCH] Updated terminal emulator function. Fixed End of Time Launcher. --- .launch/End of Time.game | 4 ++-- linux-game-manager.sh | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.launch/End of Time.game b/.launch/End of Time.game index a3e1b95..20cc68b 100644 --- a/.launch/End of Time.game +++ b/.launch/End of Time.game @@ -3,7 +3,7 @@ pushd "${mudPath%/*}" git pull | \ dialog --progressbox "Checking for updates, please wait..." -1 -1 if [[ -n "${COLORTERM}" ]]; then -terminal_emulator tt++ ${mudPath##*/} +terminal_emulator "${mudPath%/*}" "tt++" "${mudPath##*/}" else -tt++ ${mudPath##*/} +tt++ "${mudPath%/*}" "${mudPath##*/}" fi diff --git a/linux-game-manager.sh b/linux-game-manager.sh index 7b6b555..7c82dc0 100755 --- a/linux-game-manager.sh +++ b/linux-game-manager.sh @@ -111,13 +111,16 @@ check_dependencies() { # Function to open a terminal emulator terminal_emulator() { + # Arguments workingDirectory, rest of arguments + local workingDir="$1" + shift terminals=( "lxterminal" "mate-terminal" "gnome-terminal" ) for i in "${terminals[@]}" ; do - if command $i --working-directory="${game%/*}" -e $* ; then + if command $i --working-directory="${workingDir}" -e "$@" ; then return fi done