r27809 - /scripts/AUTHOR
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Sat Dec 6 14:30:13 UTC 2008
Author: dmn
Date: Sat Dec 6 14:30:10 2008
New Revision: 27809
URL: http://svn.debian.org/wsvn/?sc=1&rev=27809
Log:
abandon the idea of guessing replacement for removed accounts
This is a bad idea as there is the possibility that $author is not the
same as $author-guest.
This script is primarily intented to be used in a subversion post-commit
hook, filling git-svn AUTHORS file. In such setup, missing accounts are
extremely unlikely.
If you use it for initial population of the AUTHORS file, use your prior
knowledge to fill the missing accounts data.
Modified:
scripts/AUTHOR
Modified: scripts/AUTHOR
URL: http://svn.debian.org/wsvn/scripts/AUTHOR?rev=27809&op=diff
==============================================================================
--- scripts/AUTHOR (original)
+++ scripts/AUTHOR Sat Dec 6 14:30:10 2008
@@ -10,14 +10,13 @@
author="$1"
full_name=`getent passwd $author | cut -d: -f5 | sed 's/,.\+//'`;
-
+
+if [ -z "$full_name" ]; then
+ echo "Unable to get account information for $author" >& 2
+ exit 1
+fi
+
if echo $author | grep -E -q -e '-guest$'; then
- if [ -z "$full_name" ]; then
- # removed -guest?
- author=${author%-guest}
- full_name=`getent passwd $author | cut -d: -f5 | sed 's/,.\+//'`;
- fi
-
email=`curl -s http://alioth.debian.org/users/$author/ | grep sendmessage|grep touser|grep nospam|sed 's,.*<strong><a href[^>]\+>,,; s/<.*//; s/ @nospam@ /@/'`;
if [ -z "$email" ]; then
@@ -27,6 +26,6 @@
email="$author at debian.org";
fi;
-echo "$1 = $full_name <$email>"
+echo "$author = $full_name <$email>"
# vim: set et sw=4 sts=4 ts=8 tw=78 ai :
More information about the Pkg-perl-cvs-commits
mailing list