]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix 'make checkbashisms` warnings
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 15 Apr 2021 15:53:08 +0000 (08:53 -0700)
committerGitHub <noreply@github.com>
Thu, 15 Apr 2021 15:53:08 +0000 (08:53 -0700)
The awk command used by the checkbashisms target incorrectly
adds the escape character before the ! and # characters.  This
results in the following warnings because these characters do not
need to be escaped.

    awk: cmd. line:1: warning: regexp escape sequence
        `\!' is not a known regexp operator
    awk: cmd. line:1: warning: regexp escape sequence
        `\#' is not a known regexp operator

Remove the unneeded escape character before ! and #.

Valid escape sequences are:

    https://www.gnu.org/software/gawk/manual/html_node/Escape-Sequences.html

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11902

Makefile.am

index dd48b4a2c94f3e47ec711396c8f014b6e450ecba..30c61dda27c4617ba4ca04e06704b6965b169dd3 100644 (file)
@@ -161,7 +161,7 @@ checkbashisms:
                                -o -name '90zfs' -prune \
                                -o -type f ! -name 'config*' \
                                ! -name 'libtool' \
-                       -exec sh -c 'awk "NR==1 && /\#\!.*bin\/sh.*/ {print FILENAME;}" "{}"' \;); \
+                       -exec sh -c 'awk "NR==1 && /#!.*bin\/sh.*/ {print FILENAME;}" "{}"' \;); \
        else \
                echo "skipping checkbashisms because checkbashisms is not installed"; \
        fi