diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2017-11-26 20:23:47 +0100 |
---|---|---|
committer | Gregor Jasny <gjasny@googlemail.com> | 2017-11-26 20:23:47 +0100 |
commit | 9324937bd51daa82f805f5f75e6a3b0f9432411d (patch) | |
tree | cf8a0327f2cbf8e5cb9324c8d17ffe211e6301e2 /tools/Linux/kodi.sh.in | |
parent | f96eff4732907a1ec2cc9a840ec70c9fb5642092 (diff) |
kodi.sh: Properly quote eventually empty variables
On Ubuntu a #!/bin/sh shebang results in a pretty
minimal shell that handles empty variables not as
graceful as bash. Quoting helps here.
Diffstat (limited to 'tools/Linux/kodi.sh.in')
-rw-r--r-- | tools/Linux/kodi.sh.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/Linux/kodi.sh.in b/tools/Linux/kodi.sh.in index 740cf60b27..5e5360c96f 100644 --- a/tools/Linux/kodi.sh.in +++ b/tools/Linux/kodi.sh.in @@ -60,19 +60,19 @@ done # Your distribution might provide extra packages for those if [ "$WINDOWING" = "auto" ]; then # Wayland - if [ -n $WAYLAND_DISPLAY ] && [ -x $LIBDIR/${bin_name}/${bin_name}-wayland ]; then + if [ -n "$WAYLAND_DISPLAY" ] && [ -x $LIBDIR/${bin_name}/${bin_name}-wayland ]; then KODI_BINARY=$LIBDIR/${bin_name}/${bin_name}-wayland # X11 elif echo $DISPLAY | grep -qE ":[0-9]+" && [ -x $LIBDIR/${bin_name}/${bin_name}-x11 ]; then KODI_BINARY=$LIBDIR/${bin_name}/${bin_name}-x11 # GBM/DRM - elif [ -z $DISPLAY ] && [ -z $WAYLAND_DISPLAY ] && [ -x $LIBDIR/${bin_name}/${bin_name}-gbm ]; then + elif [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && [ -x $LIBDIR/${bin_name}/${bin_name}-gbm ]; then KODI_BINARY=$LIBDIR/${bin_name}/${bin_name}-gbm # Default kodi.bin else KODI_BINARY=${APP_BINARY} fi -elif [ -n $WINDOWING ]; then +elif [ -n "$WINDOWING" ]; then KODI_BINARY=$LIBDIR/${bin_name}/${bin_name}-${WINDOWING} else KODI_BINARY=${APP_BINARY} |