pld-builder.new: client/make-request.sh - add --branch override

glen glen at pld-linux.org
Tue Sep 16 22:29:41 CEST 2008


Author: glen                         Date: Tue Sep 16 20:29:41 2008 GMT
Module: pld-builder.new               Tag: HEAD
---- Log message:
- add --branch override

---- Files affected:
pld-builder.new/client:
   make-request.sh (1.48 -> 1.49) 

---- Diffs:

================================================================
Index: pld-builder.new/client/make-request.sh
diff -u pld-builder.new/client/make-request.sh:1.48 pld-builder.new/client/make-request.sh:1.49
--- pld-builder.new/client/make-request.sh:1.48	Sun Feb 24 14:57:31 2008
+++ pld-builder.new/client/make-request.sh	Tue Sep 16 22:29:36 2008
@@ -37,8 +37,8 @@
 	. $USER_CFG
 fi
 
-die () {
-	echo "$0: $*" 1>&2
+die() {
+	echo >&2 "$0: $*"
 	exit 1
 }
 
@@ -57,6 +57,8 @@
 	echo "       set alt_kernel to VALUE"
 	echo "  --target VALUE"
 	echo "       set --target to VALUE"
+	echo "  --branch VALUE"
+	echo "       specify default branch for specs in request"
 	echo "  -t   --test-build"
 	echo "       Performs a 'test-build'. Package will be uploaded to test/ tree"
 	echo "       and won't be upgraded on builders"
@@ -137,6 +139,11 @@
 			shift
 			;;
 
+		--branch)
+			branch=$2
+			shift
+			;;
+
 		--priority | -p )
 			priority=$2
 			shift
@@ -253,19 +260,21 @@
 	;;
 esac
 
+branch=${branch:-$default_branch}
+
 specs=`for s in $specs; do
 	case "$s" in
 	*.spec:*) # spec with branch
 		echo $s
 		;;
 	*.spec) # spec without branch
-		echo $s:$default_branch
+		echo $s:$branch
 		;;
 	*:*) # package name with branch
 		echo $s | sed -e 's/:/.spec:/'
 		;;
 	*) # just package name
-		echo $s.spec:$default_branch
+		echo $s.spec:$branch
 		;;
 	esac
 done`
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/client/make-request.sh?r1=1.48&r2=1.49&f=u



More information about the pld-cvs-commit mailing list