2 # updates percona patches
3 # http://www.percona.com/docs/wiki/release:start
4 # https://launchpad.net/percona-server/release-5.0.91-22
6 version=release-5.0.91-22
7 bzr_branch=lp:percona-server/$version
11 grep -v 'percona-support.patch' | \
12 grep -v 'mysqld_safe_syslog.patch' | \
13 grep -v 'mysql-test.patch'
17 filterdiff -x '*/configure'
22 if [ -d $version ]; then
27 bzr branch $bzr_branch $version
33 for patch in $(cat $version/series | filter_names); do
34 # if patch already existed, use mysql- prefix
35 if [ -f mysql-$patch ]; then
40 cat $version/$patch | filter_files > $file
42 if [ -z "$(awk -vfile=$file -F/ '$2 == file{print}' CVS/Entries)" ]; then
44 ${branch:+cvs up -r $branch $file}
47 if [ "$patch" != "$file" ]; then
48 echo >&2 "Adding: $file ($patch)"
50 echo >&2 "Adding: $file"
52 printf "Patch%d:\t%s\n" $i $(echo "$file" | sed -e 's,^mysql-,%{name}-,') >> .percona.spec
53 printf "%%patch%d -p1\n" $i >> .patch.spec
57 # update PatchX section
59 /^# <percona patches/,/^# <\/percona>/ {
61 /^# <percona patches/ {
70 # update %patchX section
72 /^# <percona %patches/,/^# <\/percona>/ {
74 /^# <percona %patches/ {