Marcel Telka
2023-12-13 76f3591e3dd03b6909a52de6daba331f6f997277
tools/license-detector: [[:space:]] matching should not depend on locale

1 files modified
4 ■■■■ changed files
tools/license-detector 4 ●●●● patch | view | raw | blame | history
tools/license-detector
@@ -89,9 +89,9 @@
    cat <<#EOF > "$TMPFILE"
        dos2unix -ascii \\
            | tr -d '\\014' \\
            | sed -E -e 's/^[[:space:]]+\$//g' \\
            | LC_ALL=C sed -E -e 's/^[[:space:]]+\$//g' \\
            | awk '/^#/{next}/^\$/{\$0="\n"}1' ORS=' ' \\
            | sed -E -e 's/[[:space:]]+/ /g' -e 's/^ //' -e 's/ \$//' -e '/^\$/d' \\
            | LC_ALL=C sed -E -e 's/[[:space:]]+/ /g' -e 's/^ //' -e 's/ \$//' -e '/^\$/d' \\
    EOF
    # Remove some reStructuredText markup
    if [[ "${F%.rst}" != "$F" ]] ; then