diff options
author | bk@work.mysql.com <> | 2000-07-31 21:29:14 +0200 |
---|---|---|
committer | bk@work.mysql.com <> | 2000-07-31 21:29:14 +0200 |
commit | f4c589ff6c653d1d2a09c26e46ead3c8a15655d8 (patch) | |
tree | d253a359142dfc1ed247d5d4365d86972ea31109 /Build-tools/Do-patch-file | |
parent | 7eec25e393727b16bb916b50d82b0aa3084e065c (diff) | |
download | mariadb-git-f4c589ff6c653d1d2a09c26e46ead3c8a15655d8.tar.gz |
Import changeset
Diffstat (limited to 'Build-tools/Do-patch-file')
-rwxr-xr-x | Build-tools/Do-patch-file | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Build-tools/Do-patch-file b/Build-tools/Do-patch-file new file mode 100755 index 00000000000..f5f2910bc71 --- /dev/null +++ b/Build-tools/Do-patch-file @@ -0,0 +1,41 @@ +#!/bin/sh +# make a patch file of a mysql distribution +# takes as argument the previous version + +case $# in +0) echo Usage: $0 previous_version; exit 1;; +esac + +PVER=$1; +VER=`grep SERVER_VERSION include/mysql_version.h | cut -d'"' -f2` +NEW="mysql-$VER.tar.gz" +OLD="mysql-$PVER.tar.gz" +RESULT="mysql-$PVER-$VER.patch.gz" +PATCH_DIR=/my/web/Site/html/Downloads/Patches +RESULT_DIR=/my/web/Site/html/Downloads/MySQL-3.23 + +if test ! -f $NEW +then + echo "$NEW doesn't exist"; + exit 1; +fi + +if test ! -f $RESULT_DIR/$OLD +then + echo "$RESULT_DIR/$OLD doesn't exist"; + exit 1; +fi + +mkdir patch +cd patch +gtar xfz ../$NEW +gtar xfz $RESULT_DIR/$OLD +cd mysql-$PVER +diff --context --new-file --recursive . ../mysql-$VER | gzip -9 > ../../$RESULT +cd ../.. +/bin/rm -rf patch +#chown mysql $RESULT $NEW binary/* +chmod a+r,o-w $RESULT $NEW binary/* +mv $RESULT $PATCH_DIR +mv $NEW $RESULT_DIR +cp binary/* NEW-RPMS/* $RESULT_DIR |