mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
Improve list-authors.sh to only list new authors
This commit is contained in:
@@ -12,8 +12,17 @@ rm -f authors.txt langs.txt
|
||||
for file in weblate/*.po; do
|
||||
authors=$(git log $commit..HEAD --date=format:"%Y" --format="%aN <%aE>, %ad." $file | grep -v 'anonymous' | sort -u)
|
||||
if [ ! -z "$authors" ]; then
|
||||
echo "$file" >> langs.txt
|
||||
echo -e "\n* $file:\n" >> authors.txt
|
||||
echo "$authors" >> authors.txt
|
||||
new_authors=""
|
||||
while read -r author; do
|
||||
found=$(grep "$author" $file)
|
||||
if [ -z "$found" ]; then
|
||||
new_authors+=$author$'\n'
|
||||
fi
|
||||
done <<< "$authors"
|
||||
if [ ! -z "$new_authors" ]; then
|
||||
echo "$file" >> langs.txt
|
||||
echo -e "\n* $file:\n" >> authors.txt
|
||||
echo "$new_authors" >> authors.txt
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user