diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-12-10 00:11:50 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-12-10 00:11:50 -0500 |
commit | 7511db4c833f6d25422d4340ff228ab76eba7477 (patch) | |
tree | 7cf13b286b29d20acb3412aec88fab91a11dc5b1 | |
parent | 1522061b26f6ca4af2f62da525705161d63f00ae (diff) | |
download | SMAPI-7511db4c833f6d25422d4340ff228ab76eba7477.tar.gz SMAPI-7511db4c833f6d25422d4340ff228ab76eba7477.tar.bz2 SMAPI-7511db4c833f6d25422d4340ff228ab76eba7477.zip |
open terminal on most Linux distros (#183)
-rw-r--r-- | src/StardewModdingAPI/unix-launcher.sh | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/unix-launcher.sh b/src/StardewModdingAPI/unix-launcher.sh index ce732588..6def449d 100644 --- a/src/StardewModdingAPI/unix-launcher.sh +++ b/src/StardewModdingAPI/unix-launcher.sh @@ -30,13 +30,30 @@ if [ "$UNAME" == "Darwin" ]; then cp StardewValley.bin.osx StardewModdingAPI.bin.osx open -a Terminal ./StardewModdingAPI.bin.osx $@ else + # get launcher + COMMAND="" if [ "$ARCH" == "x86_64" ]; then ln -sf mcs.bin.x86_64 mcs cp StardewValley.bin.x86_64 StardewModdingAPI.bin.x86_64 - ./StardewModdingAPI.bin.x86_64 $@ + COMMAND="./StardewModdingAPI.bin.x86_64 $@" else ln -sf mcs.bin.x86 mcs cp StardewValley.bin.x86 StardewModdingAPI.bin.x86 - ./StardewModdingAPI.bin.x86 $@ + COMMAND="./StardewModdingAPI.bin.x86 $@" + fi + + # open terminal + if command -v x-terminal-emulator 2>/dev/null; then + x-terminal-emulator -e "$COMMAND" + elif command -v gnome-terminal 2>/dev/null; then + gnome-terminal -e "$COMMAND" + elif command -v xterm 2>/dev/null; then + xterm -e "$COMMAND" + elif command -v konsole 2>/dev/null; then + konsole -e "$COMMAND" + elif command -v terminal 2>/dev/null; then + terminal -e "$COMMAND" + else + $COMMAND fi fi |