Marcel Telka
2022-10-18 b0f4ae199e5255493dfa09593df409cca0ecfd10
tools/license-detector: add dos2unix conversion

1 files modified
3 ■■■■ changed files
tools/license-detector 3 ●●●● patch | view | raw | blame | history
tools/license-detector
@@ -92,7 +92,8 @@
    LICCMD="$(grep '^# ' "$l" | sed -e 's/^# //')"
    [[ -n "$LICCMD" ]] && LICCMD=" | $LICCMD"
    CMD="awk '/^#/{next}/^\$/{\$0=\"\\n\"}1' ORS=' '"
    CMD="dos2unix -ascii"
    CMD="$CMD | awk '/^#/{next}/^\$/{\$0=\"\\n\"}1' ORS=' '"
    CMD="$CMD | sed -E -e 's/ +/ /g' -e 's/^ //' -e 's/ \$//'"
    CMD="$CMD$LICCMD"
    CMD="$CMD | tr ' ' '\\n' | gfmt -w 80"