sx: test has clearer syntax when AND or OR is used

This commit is contained in:
Earnestly 2017-12-04 11:54:51 +00:00
parent a5fc2e3907
commit f25cbb415d
1 changed files with 1 additions and 1 deletions

2
sx
View File

@ -15,7 +15,7 @@ cleanup() {
# regardless of failure.
set +o errexit
if [ "$1" ] && [ "$(ps -o comm= "$1")" = Xorg ]; then
if test "$1" -a "$(ps -o comm= "$1")" = Xorg; then
kill "$1"
# Send SIGKILL after 10 seconds if the xserver is taking too long to