[packages/rpm-build-tools/merge-pld-builder-client: 50/2675] - add --branch override

glen glen at pld-linux.org
Mon Dec 19 21:53:08 CET 2016


commit 986d76b826f6fc5051afb83bf4b60809ef99ecce
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Tue Sep 16 20:29:36 2008 +0000

    - add --branch override
    
    Changed files:
        client/make-request.sh -> 1.49

 make-request.sh | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/make-request.sh b/make-request.sh
index 5aaf22c..1e209ff 100644
--- a/make-request.sh
+++ b/make-request.sh
@@ -37,8 +37,8 @@ if [ -f "$USER_CFG" ]; then
 	. $USER_CFG
 fi
 
-die () {
-	echo "$0: $*" 1>&2
+die() {
+	echo >&2 "$0: $*"
 	exit 1
 }
 
@@ -57,6 +57,8 @@ usage() {
 	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 @@ while [ $# -gt 0 ] ; do
 			shift
 			;;
 
+		--branch)
+			branch=$2
+			shift
+			;;
+
 		--priority | -p )
 			priority=$2
 			shift
@@ -253,19 +260,21 @@ th-java) # fake "distro" for java available th architectures
 	;;
 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`
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/cca6584b96e6c33d0732d559e43e100d804e2ecd



More information about the pld-cvs-commit mailing list