mirror of https://github.com/rust-lang/rust.git
Tweak the add-authors.sh script
This commit is contained in:
parent
002b3b32fe
commit
c9edcdb270
|
@ -18,6 +18,11 @@
|
||||||
# changes. If there are incorrect additions fix it by editing
|
# changes. If there are incorrect additions fix it by editing
|
||||||
# .mailmap and re-running the script.
|
# .mailmap and re-running the script.
|
||||||
|
|
||||||
|
if [ "${1-}" = "" ]; then
|
||||||
|
echo "Usage: add-authors.sh 1.0.0..rust-lang/master"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
set -u -e
|
set -u -e
|
||||||
|
|
||||||
range="$1"
|
range="$1"
|
||||||
|
@ -27,6 +32,6 @@ tmp_file="./AUTHORS.txt.tmp"
|
||||||
old_authors="$(cat "$authors_file" | tail -n +2 | sed "/^$/d" | sort)"
|
old_authors="$(cat "$authors_file" | tail -n +2 | sed "/^$/d" | sort)"
|
||||||
new_authors="$(git log "$range" --format="%aN <%aE>" | sort | uniq)"
|
new_authors="$(git log "$range" --format="%aN <%aE>" | sort | uniq)"
|
||||||
|
|
||||||
echo "Rust was written by these fine people:\n" > "$tmp_file"
|
printf "%s\n\n" "Rust was written by these fine people:" > "$tmp_file"
|
||||||
echo "$old_authors\n$new_authors" | sort | uniq >> "$tmp_file"
|
printf "%s\n%s" "$old_authors" "$new_authors" | sort | uniq >> "$tmp_file"
|
||||||
mv -f "$tmp_file" "$authors_file"
|
mv -f "$tmp_file" "$authors_file"
|
||||||
|
|
Loading…
Reference in New Issue