diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-05-02 18:07:05 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-05-02 18:07:05 -0400 |
commit | bc9b5a84f0ecbf563d5f682f8ed38e50e7e675fc (patch) | |
tree | 5bf4eabcd97c774515fbb6337dc157d72f73c9ec /src/SMAPI.Installer/assets/unix-launcher.sh | |
parent | 7516acfadda5db8849b0e06953b7636428ee2ccd (diff) | |
download | SMAPI-bc9b5a84f0ecbf563d5f682f8ed38e50e7e675fc.tar.gz SMAPI-bc9b5a84f0ecbf563d5f682f8ed38e50e7e675fc.tar.bz2 SMAPI-bc9b5a84f0ecbf563d5f682f8ed38e50e7e675fc.zip |
use POSIX command directly in Linux launcher
Diffstat (limited to 'src/SMAPI.Installer/assets/unix-launcher.sh')
-rw-r--r-- | src/SMAPI.Installer/assets/unix-launcher.sh | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/SMAPI.Installer/assets/unix-launcher.sh b/src/SMAPI.Installer/assets/unix-launcher.sh index 0046e716..7611dfcd 100644 --- a/src/SMAPI.Installer/assets/unix-launcher.sh +++ b/src/SMAPI.Installer/assets/unix-launcher.sh @@ -59,17 +59,9 @@ else fi export LAUNCHER - # get cross-distro version of POSIX command - COMMAND="" - if command -v command 2>/dev/null; then - COMMAND="command -v" - elif type type 2>/dev/null; then - COMMAND="type -p" - fi - # select terminal (prefer xterm for best compatibility, then known supported terminals) for terminal in xterm gnome-terminal kitty terminator xfce4-terminal konsole terminal termite alacritty mate-terminal x-terminal-emulator; do - if $COMMAND "$terminal" 2>/dev/null; then + if command -v "$terminal" 2>/dev/null; then export LAUNCHTERM=$terminal break; fi @@ -77,7 +69,7 @@ else # find the true shell behind x-terminal-emulator if [ "$LAUNCHTERM" = "x-terminal-emulator" ]; then - export LAUNCHTERM="$(basename "$(readlink -f $(COMMAND x-terminal-emulator))")" + export LAUNCHTERM="$(basename "$(readlink -f $(command -v x-terminal-emulator))")" fi |