[packages/rpm-build-tools/merge-pld-builder-client: 56/2675] - http url is distro specific - expand vars in default config when creating it - verbosity of progre
glen
glen at pld-linux.org
Mon Dec 19 21:53:38 CET 2016
commit 23ed83cc0ff437485d22f966a7bafdde03350f86
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Mon Feb 9 11:14:49 2009 +0000
- http url is distro specific
- expand vars in default config when creating it
- verbosity of progress
Changed files:
client/make-request.sh -> 1.55
make-request.sh | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
---
diff --git a/make-request.sh b/make-request.sh
index 9e96ffa..fb8ca15 100644
--- a/make-request.sh
+++ b/make-request.sh
@@ -10,7 +10,7 @@ command_flags=
gpg_opts=
default_branch='HEAD'
distro=
-url="http://ep09.pld-linux.org:1234/"
+url=
[ -x /usr/bin/python ] && send_mode="python" || send_mode="mail"
@@ -22,7 +22,7 @@ fi
if [ ! -f "$USER_CFG" ]; then
echo "Creating config file $USER_CFG. You *must* edit it."
- cat >$USER_CFG <<'EOF'
+ cat > $USER_CFG <<EOF
priority=2
requester=deviloper at pld-linux.org
default_key=deviloper at pld-linux.org
@@ -31,6 +31,7 @@ url="$url"
mailer="/usr/sbin/sendmail -t"
gpg_opts=""
distro=th
+url="http://ep09.pld-linux.org:1234/"
# defaults:
f_upgrade=yes
@@ -43,12 +44,18 @@ if [ -f "$USER_CFG" ]; then
fi
send_request() {
- case "$send_mode" in
- "mail")
- cat - | $mailer
- ;;
- *)
- cat - | python -c '
+ # switch to mail mode, if no url set
+ [ -z "$url" ] && send_mode="mail"
+
+
+ case "$send_mode" in
+ "mail")
+ echo >&2 "* Sending using mail mode"
+ cat - | $mailer
+ ;;
+ *)
+ echo >&2 "* Sending using http mode to $url"
+ cat - | python -c '
import sys, urllib2
try:
@@ -61,8 +68,8 @@ except Exception, e:
sys.exit(1)
print >> sys.stdout, "Request queued."
' "$url"
- ;;
- esac
+ ;;
+ esac
}
die() {
@@ -278,10 +285,12 @@ ti)
th)
builder_email="builderth at ep09.pld-linux.org"
default_builders="th-*"
+ url="http://ep09.pld-linux.org:1234/"
;;
th-java) # fake "distro" for java available th architectures
builder_email="builderth at ep09.pld-linux.org"
default_builders="th-x86_64 th-athlon th-i686"
+ url="http://ep09.pld-linux.org:1234/"
;;
aidath)
builder_email="builderaidath at ep09.pld-linux.org"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/cca6584b96e6c33d0732d559e43e100d804e2ecd
More information about the pld-cvs-commit
mailing list