about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2015-10-28 13:13:55 -0700
committerBrian Anderson <banderson@mozilla.com>2015-10-28 13:20:42 -0700
commitc9edcdb270b3723ae27a543d6438c96439b43f5a (patch)
tree7b3335bfde7c6cf3ac9396c818ab86ad62ffa256
parent002b3b32fef002aa0cf6ae05d5d12399a1aee55e (diff)
downloadrust-c9edcdb270b3723ae27a543d6438c96439b43f5a.tar.gz
rust-c9edcdb270b3723ae27a543d6438c96439b43f5a.zip
Tweak the add-authors.sh script
-rw-r--r--src/etc/add-authors.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/etc/add-authors.sh b/src/etc/add-authors.sh
index 917053cc205..3ae0ec73957 100644
--- a/src/etc/add-authors.sh
+++ b/src/etc/add-authors.sh
@@ -18,6 +18,11 @@
 # changes. If there are incorrect additions fix it by editing
 # .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
 
 range="$1"
@@ -27,6 +32,6 @@ tmp_file="./AUTHORS.txt.tmp"
 old_authors="$(cat "$authors_file" | tail -n +2 | sed "/^$/d" | sort)"
 new_authors="$(git log "$range" --format="%aN <%aE>" | sort | uniq)"
 
-echo "Rust was written by these fine people:\n" > "$tmp_file"
-echo "$old_authors\n$new_authors" | sort | uniq >> "$tmp_file"
+printf "%s\n\n" "Rust was written by these fine people:" > "$tmp_file"
+printf "%s\n%s" "$old_authors" "$new_authors" | sort | uniq >> "$tmp_file"
 mv -f "$tmp_file" "$authors_file"