[packages/vim] add autocommit logic to update script

glen glen at pld-linux.org
Mon May 27 11:25:06 CEST 2013


commit 3f43ae6d4907fbbb4342a8f22a6464061eb5df37
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon May 27 12:24:28 2013 +0300

    add autocommit logic to update script

 update-source.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/update-source.sh b/update-source.sh
index f8c8aff..4f286b3 100755
--- a/update-source.sh
+++ b/update-source.sh
@@ -110,6 +110,15 @@ if [ "$curver" != "$ver" ]; then
 			poldek --cachedir=$HOME/tmp --mkidx -s $rpmdest/ --mt=pndir
 		fi
 	fi
+
+	# autocommit
+	msg=$(mktemp)
+	echo "updated to $ver" > $msg
+	echo "" >> $msg
+	over=$(git diff sources | awk '/^\+[0-9a-f]+/{over=$NF; gsub(/\./, "\\.",over); print over; exit}')
+	sed -ne "/$over/,\$p" README.patches | sed -re 's,^[ 0-9]+ ,,' >> $msg
+	git commit -F $msg $specfile sources
+	rm -f $msg
 else
 	echo "$specfile already up to $ver"
 fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vim.git/commitdiff/3f43ae6d4907fbbb4342a8f22a6464061eb5df37



More information about the pld-cvs-commit mailing list