commit f88a992736ec3a043fe9e8950837009a5d80b934
Author: Elan Ruusamäe <[email protected]>
Date:   Tue Feb 24 23:39:48 2015 +0200

    relup: accept make-request style branches

 relup.sh | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/relup.sh b/relup.sh
index 9a07402..9bf8fa7 100755
--- a/relup.sh
+++ b/relup.sh
@@ -77,6 +77,8 @@ bump_release() {
 package_name() {
        local specfile="${1%/}" package
 
+       # strip branch
+       specfile=${specfile%:*}
        # basename
        specfile=${specfile##*/}
        # strip .spec
@@ -85,6 +87,14 @@ package_name() {
        echo $package
 }
 
+get_branch() {
+       local specfile="${1%/}" branch
+
+       branch=${specfile#*:}
+
+       echo ${branch:-master}
+}
+
 if [ ! -x /usr/bin/getopt ]; then
        echo >&1 "You need to install util-linux to use relup.sh"
        exit 1
@@ -135,6 +145,7 @@ n="${n%%n}"
 
 cd "$topdir"
 for pkg in "$@"; do
+       branch=$(get_branch "$pkg")
        # pkg: package %{name}
        pkg=$(package_name "$pkg")
 
@@ -149,13 +160,13 @@ for pkg in "$@"; do
        specname=${spec##*/}
 
        # start real work
-       echo "$pkg ..."
+       echo "$pkg:$branch ..."
 
        # get package
        [ "$get" = 1 -a -d "$pkgdir" ] && continue
 
        if [ "$update" = "1" -o "$get" = "1" ]; then
-               ./builder -g -ns "$spec"
+               ./builder -g -ns "$spec" -r $branch
        fi
 
        [ "$get" = 1 ] && continue
================================================================

---- gitweb:

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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to