[packages/rpm-build-tools] relup: accept make-request style branches
glen
glen at pld-linux.org
Tue Feb 24 22:41:57 CET 2015
commit f88a992736ec3a043fe9e8950837009a5d80b934
Author: Elan Ruusamäe <glen at delfi.ee>
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
More information about the pld-cvs-commit
mailing list