Updated terminal emulator function. Fixed End of Time Launcher.
This commit is contained in:
parent
06c3d87db0
commit
69631769f8
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user