[projects/pld-builder.new: 1/2] add support for sending rpm --define to builders
glen
glen at pld-linux.org
Sun Oct 28 12:53:12 CET 2012
commit 0387e9e2b42c4d71f7a4f29e9027a0f895474e58
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Oct 28 13:52:55 2012 +0200
add support for sending rpm --define to builders
client/make-request.sh | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/client/make-request.sh b/client/make-request.sh
index 7251406..830d13a 100755
--- a/client/make-request.sh
+++ b/client/make-request.sh
@@ -61,6 +61,7 @@ fi
specs=
df_fetch=no
upgrade_macros=no
+cr=$(printf "\r")
# Set colors
c_star=$(tput setaf 2)
@@ -219,6 +220,8 @@ Mandatory arguments to long options are mandatory for short options too.
set alt_kernel to VALUE
--target VALUE
set --target to VALUE
+ -D "NAME VALUE"|--define "NAME VALUE"
+ define macro named NAME with value VALUE
-s BUILD_ID, --skip BUILD_ID[,BUILD_ID][,BUILD_ID]
mark build ids on src builder to be skipped
--branch VALUE
@@ -345,6 +348,13 @@ while [ $# -gt 0 ]; do
shift
;;
+ -D|--define)
+ value=${2#* }
+ name=${2%% *}
+ define="$define$cr$name=$value"
+ shift
+ ;;
+
-s|--skip)
skip="$2"
shift
@@ -685,7 +695,7 @@ gen_req() {
# job to depend on
local depend=
- local b i=1
+ local b i=1 val
local name branch builders_xml
for b in $builders; do
@@ -729,6 +739,16 @@ gen_req() {
echo " <branch>$branch</branch>"
echo " ${kernel:+<kernel>$kernel</kernel>}"
echo " ${target:+<target>$target</target>}"
+
+ oIFS=$IFS; IFS=$cr
+ for b in $define; do
+ [ -z "$b" ] && continue
+ value=${b#*=}
+ b=${b%%=*}
+ echo " <define name='$(hsc $b)'>$(hsc "$value")</define>"
+ done
+ IFS=$oIFS
+
echo " <info></info>"
echo
for b in $with; do
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/ceb429af42f8fa8f722c5db9b7e8bf62b7886a24
More information about the pld-cvs-commit
mailing list