Ensure POSIX-compliant shell scripting to support DASH
Some systems, such as Ubuntu, use DASH to provide /bin/sh
instead of BASH.
This means that we need to use POSIX compliant shell scripting as BASHisms are
unsupported in DASH. There are two BASH variable substition instances within
the code of xdg-settings.in
that cause KDE users to be unable to find the
current web browser because the script dies when hitting this unsupported code.
DASH also doesn't support the BASHism that allows ==
inside []
tests.
- Replace
${variable:0:1}
withprintf
-based equivalent. - Replace use of
==
with=
Fixes #10 (closed), #203 (closed)
Signed-off-by: Lucy Llewellyn lucyllewy@ubuntu.com
Edited by Lucy Llewellyn