]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
Adapt fetchsrc_request to git setup
authorKacper Kornet <draenog@pld-linux.org>
Fri, 3 Aug 2012 14:56:16 +0000 (15:56 +0100)
committerKacper Kornet <draenog@pld-linux.org>
Fri, 3 Aug 2012 15:26:24 +0000 (16:26 +0100)
fetchsrc_request

index 3e5e57639d1df7134a11172261ecbfff5d0def75..c72bd7ff13c40c62c5d33d4626483459e9b8f669 100755 (executable)
@@ -16,7 +16,7 @@ VIA_ARGS=""
 DMAIL="distfiles@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
 
This page took 1.403157 seconds and 4 git commands to generate.