mariadb/Build-tools/Do-patch-file

43 lines
965 B
Text
Raw Normal View History

2000-07-31 21:29:14 +02:00
#!/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 /my/tmp/BUILD/include/mysql_version.h | cut -d'"' -f2`
2000-09-07 14:43:46 +02:00
NEWDIR="binary"
2000-07-31 21:29:14 +02:00
NEW="mysql-$VER.tar.gz"
OLD="mysql-$PVER.tar.gz"
RESULT="mysql-$PVER-$VER.patch.gz"
2000-09-07 14:43:46 +02:00
PATCH_DIR=/my/web/Downloads-live/Patches
RESULT_DIR=/my/web/Downloads-live/MySQL-3.23
2000-07-31 21:29:14 +02:00
2000-09-07 14:43:46 +02:00
if test ! -f $NEWDIR/$NEW
2000-07-31 21:29:14 +02:00
then
2000-09-07 14:43:46 +02:00
echo "$NEWDIR/$NEW doesn't exist";
2000-07-31 21:29:14 +02:00
exit 1;
fi
if test ! -f $RESULT_DIR/$OLD
then
echo "$RESULT_DIR/$OLD doesn't exist";
exit 1;
fi
mkdir patch
cd patch
2000-09-07 14:43:46 +02:00
gtar xfz ../$NEWDIR/$NEW
2000-07-31 21:29:14 +02:00
gtar xfz $RESULT_DIR/$OLD
cd mysql-$PVER
diff --context --new-file --recursive . ../mysql-$VER | gzip -9 > ../../$RESULT
cd ../..
/bin/rm -rf patch
2000-09-07 14:43:46 +02:00
chmod a+r,o-w $RESULT binary/*
2000-07-31 21:29:14 +02:00
mv $RESULT $PATCH_DIR
cp binary/mysqlcom-* /net/web/home/production/data/nweb/customer/
rm binary/mysqlcom-*
2000-09-07 14:43:46 +02:00
cp binary/* $RESULT_DIR