mirror of
https://github.com/Pathoschild/SMAPI.git
synced 2026-10-12 02:08:51 +00:00
Merge pull request #977 from HoodedDeath/patch-1
Fix broken redirection syntax when checking for terminals
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function open_in_terminal { # Checks for a few different terminal emulators to launch the installer through
|
||||
if which konsole 2&>1 >/dev/null; then # KDE Konsole
|
||||
if which konsole 2>&1 >/dev/null; then # KDE Konsole
|
||||
konsole -e $1
|
||||
elif which alacritty 2&>1 >/dev/null; then # Alacritty
|
||||
elif which alacritty 2>&1 >/dev/null; then # Alacritty
|
||||
alacritty -e $1
|
||||
elif which gnome-terminal 2&>1 >/dev/null; then # GNOME Terminal
|
||||
elif which gnome-terminal 2>&1 >/dev/null; then # GNOME Terminal
|
||||
gnome-terminal -- $1
|
||||
elif which xterm 2&>1 >/dev/null; then # Xterm
|
||||
elif which xterm 2>&1 >/dev/null; then # Xterm
|
||||
xterm -e $1
|
||||
else # Use notify-send to send a message that none of these terminals were found installed and instruct the user to manually invoke this script through a terminal
|
||||
notify-send --app-name="SMAPI Installer" --urgency=critical "Failed to find a terminal to open installer with. Please use a terminal program to open the 'install on Linux.sh' script"
|
||||
|
||||
Reference in New Issue
Block a user