r27807 - /scripts/AUTHOR
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Sat Dec 6 13:59:31 UTC 2008
Author: dmn
Date: Sat Dec 6 13:59:28 2008
New Revision: 27807
URL: http://svn.debian.org/wsvn/?sc=1&rev=27807
Log:
script to translate account names into Full Name <email>; useful for git-svn AUTHORS file filling
Added:
scripts/AUTHOR (with props)
Added: scripts/AUTHOR
URL: http://svn.debian.org/wsvn/scripts/AUTHOR?rev=27807&op=file
==============================================================================
--- scripts/AUTHOR (added)
+++ scripts/AUTHOR Sat Dec 6 13:59:28 2008
@@ -1,0 +1,32 @@
+#!/bin/sh
+
+set -e
+set -u
+
+usage() {
+ echo "Syntax: $0 <author>"
+}
+[ -n "${1:-}" ] && [ -z "${2:-}" ] || usage
+
+author="$1"
+full_name=`getent passwd $author | cut -d: -f5 | sed 's/,.\+//'`;
+
+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
+ email="$author at users.alioth.debian.org";
+ fi;
+else
+ email="$author at debian.org";
+fi;
+
+echo "$author = $full_name <$email>"
+
+# vim: set et sw=4 sts=4 ts=8 tw=78 ai :
Propchange: scripts/AUTHOR
------------------------------------------------------------------------------
svn:executable = *
More information about the Pkg-perl-cvs-commits
mailing list