Fix script for updating contributors

This commit is contained in:
Azat Khuzhin 2022-11-20 23:11:00 +01:00
parent 82af0ea4ee
commit dfbb004a4a

View File

@ -12,13 +12,13 @@ function main()
git log "$(git describe --abbrev=0)..HEAD" --pretty='format:%cN%n%aN' > "$new_contributors"
awk '/^ \* / { split($0, cols, " \\* "); print(cols[2]); }' "$(path_in_repo CONTRIBUTORS.md)" | {
grep -F -x -v -f "$new_contributors"
grep -F -x -v -f- "$new_contributors"
} | {
local grep_patterns=(
GitHub
-e GitHub
)
grep -F -x -v "${grep_patterns[@]}"
} > "$new_contributors.filtered"
} | sort -u > "$new_contributors.filtered"
awk '{printf(" * %s\n", $0)}' "$new_contributors.filtered" >> "$(path_in_repo CONTRIBUTORS.md)"
}
main "$@"