pld-builder.new (WORKING): client/make-request.sh - support multip...
glen
glen at pld-linux.org
Sun Apr 1 17:34:27 CEST 2007
Author: glen Date: Sun Apr 1 15:34:27 2007 GMT
Module: pld-builder.new Tag: WORKING
---- Log message:
- support multiple distro lines in same config
---- Files affected:
pld-builder.new/client:
make-request.sh (1.19.2.10 -> 1.19.2.11)
---- Diffs:
================================================================
Index: pld-builder.new/client/make-request.sh
diff -u pld-builder.new/client/make-request.sh:1.19.2.10 pld-builder.new/client/make-request.sh:1.19.2.11
--- pld-builder.new/client/make-request.sh:1.19.2.10 Fri Jan 26 18:07:06 2007
+++ pld-builder.new/client/make-request.sh Sun Apr 1 17:34:22 2007
@@ -8,25 +8,21 @@
command=
command_flags=
default_branch='HEAD'
+distro=
if [ -n "$HOME_ETC" ]; then
USER_CFG=$HOME_ETC/.requestrc
else
USER_CFG=$HOME/.requestrc
-fi;
+fi
-if [ -f "$USER_CFG" ]; then
- . $USER_CFG
-else
+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
-builder_email=builder-ac at pld-linux.org
mailer="/usr/sbin/sendmail -t"
-default_builders="ac-*"
-#default_branch="AC-branch"
# defaults:
build_mode=ready
@@ -36,6 +32,10 @@
exit
fi
+if [ -f "$USER_CFG" ]; then
+ . $USER_CFG
+fi
+
die () {
echo "$0: $*" 1>&2
exit 1
@@ -61,6 +61,8 @@
echo " -ni -no-install-br"
echo " Do not install missing BuildRequires (--nodeps)"
echo " -f --flag"
+ echo " -d --distro"
+ echo " Specify value for \$distro"
echo " -cf --command-flag"
echo " Not yet documented"
echo " -c --command"
@@ -85,6 +87,11 @@
while [ $# -gt 0 ] ; do
case "$1" in
+ --distro | -d )
+ distro=$2
+ shift
+ ;;
+
--builder | -b )
builders="$builders $2"
shift
@@ -175,21 +182,39 @@
die "unknown knob: $1"
;;
- *:* )
+ *:* | * )
specs="$specs $1"
;;
-
- * )
- specs="$specs $1:$default_branch"
- ;;
esac
shift
done
-specs=`for s in $specs ; do
+case "$distro" in
+ac)
+ builder_email="builder-ac at pld-linux.org"
+ default_builders="ac-*"
+ default_branch="AC-branch"
+ ;;
+th)
+ builder_email="builderth at ep09.pld-linux.org"
+ default_builders="th-*"
+ ;;
+esac
+
+specs=`for s in $specs; do
case "$s" in
- *.spec:* ) echo "$s" ;;
- * ) echo "$s" | sed -e 's/:/.spec:/' ;;
+ *.spec:*) # spec with branch
+ echo $s
+ ;;
+ *.spec) # spec without branch
+ echo $s:$default_branch
+ ;;
+ *:*) # package name with branch
+ echo $s | sed -e 's/:/.spec:/'
+ ;;
+ *) # just package name
+ echo $s.spec:$default_branch
+ ;;
esac
done`
@@ -213,8 +238,8 @@
fi
ok=
-for s in $specs ; do
- ok=1
+for s in $specs; do
+ ok=1
done
if [ "$ok" = "" ] ; then
@@ -247,7 +272,13 @@
else
echo >&2 "* Using priority $priority"
+ echo >&2 "* Using email $builder_email"
+ echo >&2 "* Build mode: $build_mode"
+ if [ "$f_upgrade" = "yes" ] ; then
+ echo >&2 "* Upgrade mode: $f_upgrade"
+ fi
echo >&2 "* Queue-ID: $id"
+
# first id:
fid=
for s in $specs; do
@@ -297,4 +328,4 @@
gen_email | $mailer
-# vim:ts=2:sw=2:et
+# vim:ts=2:sw=2:noet
================================================================
---- CVS-web:
http://cvs.pld-linux.org/pld-builder.new/client/make-request.sh?r1=1.19.2.10&r2=1.19.2.11&f=u
More information about the pld-cvs-commit
mailing list