From: Kacper Kornet Date: Fri, 3 Aug 2012 14:56:16 +0000 (+0100) Subject: Adapt fetchsrc_request to git setup X-Git-Tag: auto/ac/rpm-build-tools-4.5-6~10 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=86faa9d03a85d9e867b018b3120788789364a06e;p=packages%2Frpm-build-tools.git Adapt fetchsrc_request to git setup --- 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@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