Updated terminal emulator function. Fixed End of Time Launcher.

This commit is contained in:
Storm Dragon 2024-12-31 00:08:18 -05:00
parent 06c3d87db0
commit 69631769f8
2 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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