]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - fetchsrc_request
- stupid script to put file to dropin.pld-linux.org
[packages/rpm-build-tools.git] / fetchsrc_request
index ce98ee7c51e80f458f257a5c4d1a23be647197e3..bfb182272b00e78e7e2f20a9f20f90d8cd23e09d 100644 (file)
@@ -4,7 +4,6 @@
 # Sending via 
 VIA="SENDMAIL"
 #VIA="localhost"
-SENDMAIL=/usr/bin/msmtp
 VIA_ARGS=""
 #VIA_ARGS="some additional flags"
 #
@@ -16,7 +15,7 @@ LOGIN=`cat CVS/Root | awk -F: '{ print $3; }' | perl -pi -e "s/@.+//"`
 #LOGIN="djrzulf"
 #
 # HOST
-HOST=pld-linux.org
+HOST=`hostname -f`
 #HOST="knycz.net"
 #
 # functions
@@ -39,21 +38,27 @@ if [ "$2" != "" ]; then
 else
        BRANCH="HEAD"
 fi
+SPEC="$1"
+if [[ "$SPEC" != *.spec ]]; then
+       SPEC="$SPEC.spec"
+fi
 
 if [ "$VIA" = "SENDMAIL" ]; then
-       cat <<EOF | $SENDMAIL -t $VIA_ARGS 
+       echo >&2 "Requesting $SPEC:$BRANCH via sendmail${VIA_ARGS:+ ($VIA_ARGS)}"
+       cat <<EOF | /usr/sbin/sendmail -t $VIA_ARGS 
 To: $DMAIL
 From: $LOGIN <$LOGIN@$HOST>
 Subject: fetchsrc_request notify 
 X-CVS-Module: SPECS
 X-distfiles-request: yes
 X-Login: $LOGIN
-X-Spec: $1
+X-Spec: $SPEC
 X-Branch: $BRANCH
 X-Flags: force-reply
 .
 EOF
 else
+       echo >&2 "Requesting $SPEC:$BRANCH via SMTP ($VIA:25)"
        cat <<EOF | /usr/bin/nc $VIA 25 > /dev/null
 EHLO $HOST
 MAIL FROM: $LOGIN <$LOGIN@$HOST>
@@ -64,7 +69,7 @@ Subject: fetchsrc_request notify
 X-CVS-Module: SPECS
 X-distfiles-request: yes
 X-Login: $LOGIN
-X-Spec: $1
+X-Spec: $SPEC
 X-Branch: $BRANCH
 X-Flags: force-reply
 .
This page took 0.030044 seconds and 4 git commands to generate.