In /usr/bin/discover-config line 11:
:; major_version="2"; minor_version="1"; micro_version="0"; version="${major_version}.${minor_version}.${micro_version}"; cppflags=""; ldflags=""; libs="-ldiscover -lusb -lexpat "; prefix="/usr"; exec_prefix="/usr/local"; bindir="${exec_prefix}/bin"; sbindir="/sbin"; libexecdir="${exec_prefix}/libexec"; datadir="${datarootdir}"; sysconfdir="/etc"; sharedstatedir="${prefix}/com"; localstatedir="/var"; libdir="${exec_prefix}/lib"; includedir="${prefix}/include"; oldincludedir="/usr/include"; infodir="${prefix}/share/info"; mandir="${prefix}/share/man"; build="x86_64-pc-linux-gnu"; build_cpu="x86_64"; build_vendor="pc"; build_os="linux-gnu"; host="x86_64-pc-linux-gnu"; host_cpu="x86_64"; host_vendor="pc"; host_os="linux-gnu"; target="x86_64-pc-linux-gnu"; target_cpu="x86_64"; target_vendor="pc"; target_os="linux-gnu"; lt_current="2"; lt_revision="1"; lt_age="0"
                                                            ^-----^ SC2034: version appears unused. Verify use (or export if used externally).
                                                                                                                          ^------^ SC2034: cppflags appears unused. Verify use (or export if used externally).
                                                                                                                                       ^-----^ SC2034: ldflags appears unused. Verify use (or export if used externally).
                                                                                                                                                   ^--^ SC2034: libs appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                              ^----^ SC2034: bindir appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                           ^-----^ SC2034: sbindir appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                            ^--------^ SC2034: libexecdir appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                 ^-----^ SC2034: datadir appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                          ^------------^ SC2154: datarootdir is referenced but not assigned.
                                                                                                                                                                                                                                                                                                                                           ^--------^ SC2034: sysconfdir appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                              ^------------^ SC2034: sharedstatedir appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                              ^-----------^ SC2034: localstatedir appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                    ^----^ SC2034: libdir appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^--------^ SC2034: includedir appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^-----------^ SC2034: oldincludedir appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^-----^ SC2034: infodir appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^----^ SC2034: mandir appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ^---^ SC2034: build appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ^-------^ SC2034: build_cpu appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ^----------^ SC2034: build_vendor appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^------^ SC2034: build_os appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^--^ SC2034: host appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ^------^ SC2034: host_cpu appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ^---------^ SC2034: host_vendor appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ^-----^ SC2034: host_os appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ^----^ SC2034: target appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ^--------^ SC2034: target_cpu appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ^-----------^ SC2034: target_vendor appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^-------^ SC2034: target_os appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ^--------^ SC2034: lt_current appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ^---------^ SC2034: lt_revision appears unused. Verify use (or export if used externally).
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ^----^ SC2034: lt_age appears unused. Verify use (or export if used externally).


In /usr/bin/discover-config line 26:
        echo ${i}
             ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        echo "${i}"


In /usr/bin/discover-config line 35:
        if [ ${var} = ${i} ]; then
             ^----^ SC2086: Double quote to prevent globbing and word splitting.
                      ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        if [ "${var}" = "${i}" ]; then


In /usr/bin/discover-config line 59:
        exit ${EXIT_USAGE}
             ^-----------^ SC2153: Possible misspelling: EXIT_USAGE may not be assigned, but EX_USAGE is.
             ^-----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        exit "${EXIT_USAGE}"


In /usr/bin/discover-config line 63:
        var=$(echo $1 | sed -e 's/^--//' -e 's/-/_/g')
                   ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        var=$(echo "$1" | sed -e 's/^--//' -e 's/-/_/g')


In /usr/bin/discover-config line 64:
        if have ${var}; then
                ^----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
        if have "${var}"; then


In /usr/bin/discover-config line 66:
            echo ${val}
                 ^----^ SC2154: val is referenced but not assigned (for output from commands, use "$(val ...)" ).
                 ^----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
            echo "${val}"

For more information:
  https://www.shellcheck.net/wiki/SC2034 -- bindir appears unused. Verify use...
  https://www.shellcheck.net/wiki/SC2153 -- Possible misspelling: EXIT_USAGE ...
  https://www.shellcheck.net/wiki/SC2154 -- datarootdir is referenced but not...