2 # updates percona patches
3 # http://www.percona.com/docs/wiki/repositories:start
4 # https://launchpad.net/percona-server/5.5
5 # bzr branch lp:percona-server/5.5
8 bzr_branch=lp:percona-server/$version
12 grep -v 'percona-support.patch' | \
13 grep -v 'mysqld_safe_syslog.patch' | \
14 grep -v 'mysql-test.diff'
18 filterdiff -x '*/configure'
21 if [ -d $version ]; then
26 bzr branch $bzr_branch $version
32 for patch in $(cat $version/series | filter_names); do
33 # if patch already existed, use mysql- prefix
34 if [ -f mysql-$patch ]; then
39 cat $version/$patch | filter_files > $file
41 if [ -z "$(awk -vfile=$file -F/ '$2 == file{print}' CVS/Entries)" ]; then
43 ${branch:+cvs up -r $branch $file}
46 if [ "$patch" != "$file" ]; then
47 echo >&2 "Adding: $file ($patch)"
49 echo >&2 "Adding: $file"
51 printf "Patch%d:\t%s\n" $i $(echo "$file" | sed -e 's,^mysql-,%{name}-,') >> .percona.spec
52 printf "%%patch%d -p1\n" $i >> .patch.spec
56 # update PatchX section
58 /^# <percona patches/,/^# <\/percona>/ {
60 /^# <percona patches/ {
69 # update %patchX section
71 /^# <percona %patches/,/^# <\/percona>/ {
73 /^# <percona %patches/ {