]>
git.proxmox.com Git - rustc.git/blob - src/etc/add-authors.sh
3 # Copyright 2014 The Rust Project Developers. See the COPYRIGHT
4 # file at the top-level directory of this distribution and at
5 # http://rust-lang.org/COPYRIGHT.
7 # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
8 # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
9 # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
10 # option. This file may not be copied, modified, or distributed
11 # except according to those terms.
13 # This script, invoked e.g. "add-authors.sh 1.0.0..rust-lang/master",
14 # will merge new authors into AUTHORS.txt, obeying the mailmap
17 # After running this script, run `git diff` to manually inspect
18 # changes. If there are incorrect additions fix it by editing
19 # .mailmap and re-running the script.
25 authors_file
="./AUTHORS.txt"
26 tmp_file
="./AUTHORS.txt.tmp"
27 old_authors
="$(cat "$authors_file" | tail -n +2 | sed "/^$
/d
" | sort)"
28 new_authors
="$(git log "$range" --format="%aN
<%aE
>" | sort | uniq)"
30 echo "Rust was written by these fine people:\n" > "$tmp_file"
31 echo "$old_authors\n$new_authors" |
sort |
uniq >> "$tmp_file"
32 mv -f "$tmp_file" "$authors_file"