misc/qubes-run-gnome-terminal: avoid external utility (grep)
Shave off a few milliseconds.
This commit is contained in:
parent
076275c154
commit
9d9ef25b05
@ -5,8 +5,7 @@
|
|||||||
# Check if our gnome-terminal version supports --wait
|
# Check if our gnome-terminal version supports --wait
|
||||||
# (we can't just run it and check exit code, because if it works, it will
|
# (we can't just run it and check exit code, because if it works, it will
|
||||||
# return the exit code of the child process)
|
# return the exit code of the child process)
|
||||||
if gnome-terminal --help-terminal-options | grep --silent -- --wait; then
|
case "$(gnome-terminal --help-terminal-options)" in
|
||||||
exec gnome-terminal --wait "$@"
|
*--wait*) exec gnome-terminal --wait "$@" ;;
|
||||||
else
|
*) exec gnome-terminal "$@" ;;
|
||||||
exec gnome-terminal "$@"
|
esac
|
||||||
fi
|
|
||||||
|
Loading…
Reference in New Issue
Block a user