brp-sign-kmodules.in: fix couple of shellcheck warnings

SC2162 ("read without -r will mangle backslashes") and SC2086: ("Double
quote to prevent globbing and word splitting").  These actually seem to
be harmless in our case.
This commit is contained in:
Gleb Fotengauer-Malinovskiy 2021-11-02 20:41:58 +03:00
parent 7a87954821
commit d60876ea4f

View File

@ -88,7 +88,7 @@ fi
find "$RPM_BUILD_ROOT/lib/modules" -name '*.ko*' > .kmodules
num=$(wc -l < .kmodules)
if [ $num -eq 0 ]; then
if [ "$num" -eq 0 ]; then
Warning "No kernel modules found for singing."
exit 0
fi
@ -104,7 +104,7 @@ rm "$t"
cd "$RPM_BUILD_ROOT"
# Determine if we should uncompress.
read f < .kmodules
read -r f < .kmodules
rezip=
if [ -z "${f#*.ko.[gx]z}" ]; then
rezip=${f##*.}