common: properly quote strings tested with -n
Per the Advanced Bash Scripting Guide:
"The -n test requires that the string be quoted within the test brackets.
Using an unquoted string with ! -z, or even just the unquoted string
alone within test bracket normally works, however, this is an unsafe
practice. Always quote a tested string."
And indeed:
$ unset FOOBAR
$ [ -n $FOOBAR ] || echo nope
$ [ -n "$FOOBAR" ] || echo nope
nope
Ran into this on a box w/o the attr program installed, and passed
_require_attrs. Quoting the string fixes this; fix it there
and other occurrences in common/* as well.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>