[packages/rpm-build-tools] Adapt fetchsrc_request to git setup

draenog draenog at pld-linux.org
Fri Aug 3 17:32:02 CEST 2012


commit 86faa9d03a85d9e867b018b3120788789364a06e
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Fri Aug 3 15:56:16 2012 +0100

    Adapt fetchsrc_request to git setup

 fetchsrc_request | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)
---
diff --git a/fetchsrc_request b/fetchsrc_request
index 3e5e576..c72bd7f 100755
--- a/fetchsrc_request
+++ b/fetchsrc_request
@@ -16,7 +16,7 @@ VIA_ARGS=""
 DMAIL="distfiles at pld-linux.org"
 #
 # CVS LOGIN or fill it by hand :)
-tmp=$(awk -F: '{ print $3; }' CVS/Root)
+tmp=$(git config user.email)
 LOGIN=${tmp%@*}
 #LOGIN="djrzulf"
 #
@@ -38,19 +38,16 @@ if [ "$#" = 0 ]; then
 	usage
 	exit 1
 fi
-if [ "$LOGIN" == "cvs" ]; then
-	echo "Use fetchsrc_request from your R/W CVS tree or set LOGIN by hand" >&2
-	exit 1
-fi
 if [ "$2" != "" ]; then
 	BRANCH="$2"
 else
-	BRANCH="HEAD"
+	BRANCH="refs/heads/master"
 fi
-SPEC="$(basename $1)"
-if [[ "$SPEC" != *.spec ]]; then
-	SPEC="$SPEC.spec"
+if [[ "$BRANCH" != refs/* ]]; then
+	BRANCH="refs/heads/$BRANCH"
 fi
+SPEC="$(basename $1)"
+SPEC=${SPEC%.spec}
 
 if [ "$VIA" = "SENDMAIL" ]; then
 	echo >&2 "Requesting $SPEC:$BRANCH via $MAILER ${VIA_ARGS:+ ($VIA_ARGS)}"
@@ -58,10 +55,9 @@ if [ "$VIA" = "SENDMAIL" ]; then
 To: $DMAIL
 From: $LOGIN <$LOGIN@$HOST>
 Subject: fetchsrc_request notify
-X-CVS-Module: SPECS
 X-distfiles-request: yes
 X-Login: $LOGIN
-X-Spec: $SPEC
+X-Package: $SPEC
 X-Branch: $BRANCH
 X-Flags: force-reply
 
@@ -76,10 +72,9 @@ RCPT TO: $DMAIL
 DATA
 To: $DMAIL
 Subject: fetchsrc_request notify
-X-CVS-Module: SPECS
 X-distfiles-request: yes
 X-Login: $LOGIN
-X-Spec: $SPEC
+X-Package: $SPEC
 X-Branch: $BRANCH
 X-Flags: force-reply
 


More information about the pld-cvs-commit mailing list