From 3f43ae6d4907fbbb4342a8f22a6464061eb5df37 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 27 May 2013 12:24:28 +0300 Subject: [PATCH] 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 -- 2.44.0