diff options
Diffstat (limited to 'scripts/mpd-pulse')
-rwxr-xr-x | scripts/mpd-pulse | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/mpd-pulse b/scripts/mpd-pulse index 8fe5651..d20c683 100755 --- a/scripts/mpd-pulse +++ b/scripts/mpd-pulse @@ -7,9 +7,9 @@ host="$(hostname)" function connect () { - if [[ $1 != "${host}"* ]] && [[ $1 != localhost* ]]; then + if [[ "$1" != "${host}"* ]] && [[ "$1" != localhost* ]]; then echo "Connecting with host \"$1\" using pax11publish." - pax11publish -S $1 -e + pax11publish -S "$1" -e else exit 0 fi @@ -37,14 +37,14 @@ if [ ${#@} -gt 0 ]; then while getopts 'c:d:h' flag; do case "${flag}" in c) - if [ ! -z "${OPTARG}" ]; then + if [ -n "${OPTARG}" ]; then connect "${OPTARG}" else exit 1 fi ;; d) - if [ ! -z "${OPTARG}" ]; then + if [ -n "${OPTARG}" ]; then disconnect "${OPTARG}" else exit 1 |