]> git.pld-linux.org Git - packages/rpm-build-tools.git/blame - fetchsrc_request
- sunsite mirror is outdated; torman is more up-to-date
[packages/rpm-build-tools.git] / fetchsrc_request
CommitLineData
62f6c727 1#!/bin/sh
2# $Id$
3#
4# Sending via
16641ef8 5VIA="SENDMAIL"
62f6c727 6#VIA="localhost"
62f6c727 7#
8# DISTFILES EMAIL
656c0675 9DMAIL="distfiles@pld-linux.org"
62f6c727 10#
11# CVS LOGIN or fill it by hand :)
12LOGIN=`cat CVS/Root | awk -F: '{ print $3; }' | perl -pi -e "s/@.+//"`
13#LOGIN="djrzulf"
14#
15# HOST
16HOST=`hostname -f`
16641ef8 17#HOST="knycz.net"
62f6c727 18#
19# functions
20
21usage()
22{
23 echo "\
24Usage: fetchsrc_request file.spec [BRANCH]
25"
26}
27
28#------------------
29# main()
30if [ "$#" = 0 ]; then
31 usage;
32 exit 1
33fi
a6359a62 34if [ "$2" != "" ]; then
35 BRANCH="$2"
62f6c727 36else
37 BRANCH="HEAD"
38fi
39
16641ef8 40if [ "$VIA" = "SENDMAIL" ]; then
c17d602d 41 cat <<EOF | /usr/sbin/sendmail -t
42To: $DMAIL
43From: $LOGIN <$LOGIN@$HOST>
44Subject: fetchsrc_request notify
45X-CVS-Module: SPECS
46X-distfiles-request: yes
47X-Login: $LOGIN
48X-Spec: $1
49X-Branch: $BRANCH
50X-Flags: force-reply
51.
52EOF
16641ef8 53else
c17d602d 54 cat <<EOF | /usr/bin/nc $VIA 25 > /dev/null
55EHLO $HOST
56MAIL FROM: $LOGIN <$LOGIN@$HOST>
57RCPT TO: $DMAIL
58DATA
59To: $DMAIL
60Subject: fetchsrc_request notify
61X-CVS-Module: SPECS
62X-distfiles-request: yes
63X-Login: $LOGIN
64X-Spec: $1
65X-Branch: $BRANCH
66X-Flags: force-reply
67.
68QUIT
69EOF
16641ef8 70fi
62f6c727 71
This page took 0.038024 seconds and 4 git commands to generate.