[packages/ruby-di-ruby-lvm-attrib] add script to create upstream PR with new attributes

glen glen at pld-linux.org
Mon Jul 13 21:51:58 CEST 2015


commit 51b256d9248a377241a31cabbbc1de523b7c779d
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Jul 13 22:51:41 2015 +0300

    add script to create upstream PR with new attributes

 pld-update-attributes.sh | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
---
diff --git a/pld-update-attributes.sh b/pld-update-attributes.sh
new file mode 100755
index 0000000..9b664f3
--- /dev/null
+++ b/pld-update-attributes.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# Creates branch for GitHub PR to submit upstream new LVM version attributes
+# Version is taken as version of device-mapper-devel package
+#
+# Usage:
+# ./pld-update-attributes.sh
+# Author: Elan Ruusamäe <glen at pld-linux.org>
+#
+
+git_url=git at github.com:gregsymons/di-ruby-lvm-attrib.git
+dir=di-ruby-lvm-attrib
+set -e
+
+if [ ! -d "$dir" ]; then
+	git clone $git_url $dir --depth=1
+fi
+
+cd $dir
+
+git checkout next
+git pull --rebase
+lvm_version=$(rpm -q device-mapper-devel --qf '%{V}')
+tag_ver=v$(echo "$lvm_version" | tr . _)
+
+./update-lvm.sh "$tag_ver"
+
+lvm_dir=$(ls -d "$lvm_version("*")-git")
+attr_dir=lib/lvm/attributes/${lvm_dir%-git}
+mv $lvm_dir $attr_dir
+
+git add -A $attr_dir
+git checkout -b LVM-$lvm_version
+git commit -am "Added $lvm_version attributes"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby-di-ruby-lvm-attrib.git/commitdiff/51b256d9248a377241a31cabbbc1de523b7c779d



More information about the pld-cvs-commit mailing list