]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
relup: accept make-request style branches
authorElan Ruusamäe <glen@delfi.ee>
Tue, 24 Feb 2015 21:39:48 +0000 (23:39 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 24 Feb 2015 21:41:49 +0000 (23:41 +0200)
relup.sh

index 9a07402e5bfc5f0a574a31c602f59cd8f45de329..9bf8fa78d39064f271c382f9f000a1103f22c1c1 100755 (executable)
--- 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
This page took 0.05583 seconds and 4 git commands to generate.