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-11-18 18:35:49 +05:30
parent 1825d042fb
commit aa92c32730

View File

@ -1,13 +1,13 @@
#!/bin/bash
set -e
# stolen from http://cgit.drupalcode.org/octopus/commit/?id=db4f837
includedir=`mysql_config --variable=pkgincludedir`
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
LOG_FILE=`readlink -m "$includedir/$_THIS_DB_VERSION-fixed.log"`
if [ "$_THIS_DB_VERSION" = "5.5.40" ] && [ ! -e $LOG_FILE ] ; then
cd $includedir
sudo patch -p1 < $thiscwd/my_config.h.patch &> /dev/null
sudo touch $includedir-$_THIS_DB_VERSION-fixed.log
sudo touch $LOG_FILE
fi