tools/license-detector: properly detect BSD-3-Clause without empty line between terms
| | |
| | | # |
| | | |
| | | %hook-no-license% |
| | | cat "$SOURCE_DIR/README" | gsed -e '0,/^5\. Copyright$/d' -e '/./,$!d' -e 's/^\([123]\)/\n\1/' > "$DISTRIBUTION.license" |
| | | cat "$SOURCE_DIR/README" | gsed -e '0,/^5\. Copyright$/d' -e '/./,$!d' > "$DISTRIBUTION.license" |
| | | USE_DEFAULT_PERL_LICENSE=0 |
| | |
| | | # sed -E -n |
| | | # -e 's/^[123]\. +//' |
| | | # -e 's/^\* +//' |
| | | # -e 's/^.*(be used to endorse or promote products.*)$/REPLACEABLE \1/' |
| | | # sed -n |
| | | # -e 's/``/"/g' -e "s/''/\"/g" |
| | | # -e 's/(THIS SOFTWARE IS PROVIDED BY).*("AS IS" AND ANY).*(OR IMPLIED WARRANTIES)/\1 REPLACEABLE \2 REPLACEABLE \3/' |
| | | # -e 's/(IN NO EVENT SHALL).*(BE LIABLE)/\1 REPLACEABLE \2/' |
| | | # -e 's/[123]\./*/g' |
| | | # -e 's/\*[^*]*\(be used to endorse or promote products\)/* REPLACEABLE \1/' |
| | | # -e 's/\* *//g' |
| | | # -e 's/\(THIS SOFTWARE IS PROVIDED BY\).*\("AS IS" AND ANY\).*\(OR IMPLIED WARRANTIES\)/\1 REPLACEABLE \2 REPLACEABLE \3/' |
| | | # -e 's/\(IN NO EVENT SHALL\).*\(BE LIABLE\)/\1 REPLACEABLE \2/' |
| | | # -e '/^Redistribution and use/,/^THIS SOFTWARE/p' |
| | | Copyright (c) <year> <owner>. |
| | | |