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