]> git.pld-linux.org Git - packages/vim.git/blobdiff - update-source.sh
updated to 7.4.516
[packages/vim.git] / update-source.sh
index f8c8aff903f9f1e0e826f8c896aee54edbabb850..9ef41e4eee5e1d382797e1f29075f198852a888e 100755 (executable)
@@ -22,15 +22,14 @@ fi
 
 pkg=vim
 specfile=$pkg.spec
-basever=7.3
+basever=7.4
 baseurl=ftp://ftp.vim.org/pub/editors/vim/patches/$basever
 sources=ftp://ftp.vim.org/pub/editors/vim/patches/$basever/MD5SUMS
 
 status=$(git status --porcelain sources)
 if [ "$status" ]; then
-       echo >&2 "sources status not clean; commit or stash any pending changes"
+       echo >&2 "WARNING: sources status not clean; commit or stash any pending changes"
        echo "$status"
-       exit 1
 fi
 
 if [ "$1" ]; then
@@ -59,6 +58,7 @@ if [ "$curver" != "$ver" ]; then
        fi
        sed -i -e "
                s/^\(%define[ \t]\+patchlevel[ \t]\+\)[0-9]\+\$/\1$patch/
+               s/^\(%define[ \t]\+rel[ \t]\+\)[0-9]\+\$/\11/
        " $specfile
 
        # fetch missing/mismatching files manually. faster than builder does that
@@ -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
This page took 0.025239 seconds and 4 git commands to generate.