]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix: shellcheck for configure
authorHarald Hoyer <harald@redhat.com>
Fri, 12 Feb 2021 12:26:09 +0000 (13:26 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Mon, 15 Feb 2021 10:00:37 +0000 (11:00 +0100)
configure

index aceec138443d553611a3700ffa17265b8c099b3a..a8b6e5760f585aad67a1f73a67997ceccd965aa6 100755 (executable)
--- a/configure
+++ b/configure
@@ -19,9 +19,9 @@ read_arg() {
     # $3 = arg parameter
     local rematch='^[^=]*=(.*)$'
     if [[ $2 =~ $rematch ]]; then
-        read "$1" <<< "${BASH_REMATCH[1]}"
+        read -r "$1" <<< "${BASH_REMATCH[1]}"
     else
-        read "$1" <<< "$3"
+        read -r "$1" <<< "$3"
         # There is no way to shift our callers args, so
         # return 1 to indicate they should do it instead.
         return 1
@@ -65,6 +65,7 @@ int main() {
 }
 EOF
 
+# shellcheck disable=SC2086
 ${CC} $CFLAGS $LDFLAGS conftest.c >/dev/null 2>&1
 ret=$?
 rm -f conftest.c a.out
@@ -85,7 +86,8 @@ EOF
 
 found=no
 for lib in "-lc" "-lfts"; do
-       ${CC} $CFLAGS $LDFLAGS conftest.c -Wl,$lib >/dev/null 2>&1
+  # shellcheck disable=SC2086
+  ${CC} $CFLAGS $LDFLAGS conftest.c -Wl,$lib >/dev/null 2>&1
        ret=$?
        if test $ret -eq 0; then
                FTS_LIBS="$lib"