Author: glen Date: Mon Feb 9 11:14:54 2009 GMT Module: pld-builder.new Tag: HEAD ---- Log message: - http url is distro specific - expand vars in default config when creating it - verbosity of progress
---- Files affected: pld-builder.new/client: make-request.sh (1.54 -> 1.55) ---- Diffs: ================================================================ Index: pld-builder.new/client/make-request.sh diff -u pld-builder.new/client/make-request.sh:1.54 pld-builder.new/client/make-request.sh:1.55 --- pld-builder.new/client/make-request.sh:1.54 Mon Feb 9 12:06:59 2009 +++ pld-builder.new/client/make-request.sh Mon Feb 9 12:14:49 2009 @@ -10,7 +10,7 @@ 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 @@ 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 [email protected] [email protected] @@ -31,6 +31,7 @@ mailer="/usr/sbin/sendmail -t" gpg_opts="" distro=th +url="http://ep09.pld-linux.org:1234/" # defaults: f_upgrade=yes @@ -43,12 +44,18 @@ 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 @@ sys.exit(1) print >> sys.stdout, "Request queued." ' "$url" - ;; - esac + ;; + esac } die() { @@ -278,10 +285,12 @@ th) builder_email="[email protected]" default_builders="th-*" + url="http://ep09.pld-linux.org:1234/" ;; th-java) # fake "distro" for java available th architectures builder_email="[email protected]" default_builders="th-x86_64 th-athlon th-i686" + url="http://ep09.pld-linux.org:1234/" ;; aidath) builder_email="[email protected]" ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/client/make-request.sh?r1=1.54&r2=1.55&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
