]> TLD Linux GIT Repositories - packages/rpm-build-tools.git/blob - fetchsrc_request.sh
- more directories to trigger systemd excludes
[packages/rpm-build-tools.git] / fetchsrc_request.sh
1 #!/bin/sh
2
3 # GIT LOGIN or fill it by hand :)
4 tmp=$(git config user.email)
5 #LOGIN=${tmp%@*}
6 LOGIN="hawk"
7 #HOST=`hostname -f`
8 HOST="src.tld-linux.org"
9
10 if [ "$#" = 0 ]; then
11         echo "Usage: fetchsrc_request file.spec [BRANCH]"
12         echo
13         exit 1
14 fi
15 if [ "$2" != "" ]; then
16         BRANCH="$2"
17 else
18         BRANCH="refs/heads/master"
19 fi
20 if [[ "$BRANCH" != refs/* ]]; then
21         BRANCH="refs/heads/$BRANCH"
22 fi
23 SPEC="$(basename $1)"
24 SPEC=${SPEC%.spec}
25
26 echo >&2 "Requesting $SPEC:$BRANCH"
27 curl -d "type=fetchsrc&from=$LOGIN&spec=$SPEC&branch=$BRANCH&flags=force-reply" -H "Content-Type: application/x-www-form-urlencoded" -X POST https://df.tld-linux.org/api/ >&2