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
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