2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-11 15:51:03 +00:00

fix mariadb patch

This commit is contained in:
Pratik Vyas 2014-10-13 11:45:06 +05:30
parent 60754d2929
commit 401a41331b
2 changed files with 5 additions and 2 deletions

View File

@ -334,7 +334,8 @@ def patch():
@click.command('mariadb-config')
def _patch_mariadb_config():
"patch MariaDB 5.5.40"
exec_cmd(os.path.join(os.path.dirname(__file__), 'patches', 'fix-mariadb.sh'))
repo_dir = os.path.dirname(__file__)
exec_cmd(os.path.join(repo_dir, 'patches', 'fix-mariadb.sh'), cwd=os.path.join(repo_dir, 'patches'))
patch.add_command(_patch_mariadb_config)

View File

@ -1,4 +1,6 @@
#!/bin/bash
set -e
# stolen from http://cgit.drupalcode.org/octopus/commit/?id=db4f837
includedir=`mysql_config --variable=pkgincludedir`
@ -6,6 +8,6 @@ thiscwd=`pwd`
_THIS_DB_VERSION=`mysql -V 2>&1 | tr -d "\n" | cut -d" " -f6 | awk '{ print $1}' | cut -d"-" -f1 | awk '{ print $1}' | sed "s/[\,']//g"`
if [ "$_THIS_DB_VERSION" = "5.5.40" ] && [ ! -e "$includedir-$_THIS_DB_VERSION-fixed.log" ] ; then
cd $includedir
sudo patch -p1 < $thiscwd/ci/my_config.h.patch &> /dev/null
sudo patch -p1 < $thiscwd/my_config.h.patch &> /dev/null
sudo touch $includedir-$_THIS_DB_VERSION-fixed.log
fi