r77773 - /scripts/AUTHOR

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Sat Jul 23 16:33:37 UTC 2011


Author: dmn
Date: Sat Jul 23 16:33:35 2011
New Revision: 77773

URL: http://svn.debian.org/wsvn/?sc=1&rev=77773
Log:
assume missing -guest accounts are upgraded DDs and try looking without the -guest suffix

Modified:
    scripts/AUTHOR

Modified: scripts/AUTHOR
URL: http://svn.debian.org/wsvn/scripts/AUTHOR?rev=77773&op=diff
==============================================================================
--- scripts/AUTHOR (original)
+++ scripts/AUTHOR Sat Jul 23 16:33:35 2011
@@ -9,11 +9,22 @@
 [ -n "${1:-}" ] && [ -z "${2:-}" ] || usage
 
 author="$1"
+real_author=$author
 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
+    if echo $author  | grep -q -E -- '-guest$'; then
+	echo "  trying without -guest suffix" >& 2
+	author=`echo $author | sed 's/-guest$//'`
+	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
+    else
+    	exit 1
+    fi
 fi
 
 if which curl > /dev/null; then
@@ -32,6 +43,6 @@
     email="$author at debian.org";
 fi;
 
-echo "$author = $full_name <$email>"
+echo "$real_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