Skip to content
This repository was archived by the owner on Jul 22, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions bin/mage-ci
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ script_dir=$(dirname $script_bin)
action=$1
shift;

MAGECI_TMP=$(dirname $script_dir)/.tmp
#MAGECI_TMP=$(dirname $script_dir)/.tmp
MAGECI_TMP=/var/tmp/magento_downloads

#mkdir $MAGECI_TMP

if [ -e $HOME/.mageci.conf ]
then
Expand Down Expand Up @@ -338,7 +341,7 @@ install_magento ()
local magento_dir=$1; local version=$2; local db_name=$3; shift 3
local db_create; local db_user="root"; local db_pass=""; local sql_dump_file=""; local include_test_db
local phpunit_local_xml; local opt; local sql_base_url; local db_cred
local base_url="http://magento.local/"; local download_dir=$MAGECI_TMP;
local base_url="http://127.0.0.1:8085/"; local download_dir=$MAGECI_TMP;
local admin_password="123123test"; local clean_up=0; local no_download="0";

while getopts :u:r:p:f:b:d:a:cton opt
Expand Down Expand Up @@ -462,6 +465,26 @@ install_magento ()
config_file_tmp="${config_file}.tmp"
cp $config_file $config_file_tmp
sed 's/<pdo_mysql\/>/<pdo_mysql>1<\/pdo_mysql>/' $config_file_tmp > $config_file

# Special case for smaller versions Magento 1.7.0.2 with the installation process when the InnoDB is not supported. Applied version of lines of code 1.9.x
version_string_to_compare=$(echo $version | sed -r 's/[.]//g')
#if [[ $version_string_to_compare -lt "1702" ]]
#then

echo "${MAGECIF[2]}Applying innoDB fix...${MAGECIF[0]}"
db_file="${magento_dir}/app/code/core/Mage/Install/Model/Installer/Db/Mysql4.php"
db_file_tmp="${db_file}.tmp"
db_file_tmp2="${db_file}.tmp2"
db_file_tmp3="${db_file}.tmp3"
cp $db_file $db_file_tmp
sed '63d' $db_file > $db_file_tmp2
fix_mage="return isset(\$variables['InnoDB']) && (\$variables['InnoDB'] == 'DEFAULT' || \$variables['InnoDB'] == 'YES');"
sed 's/SHOW VARIABLES/SHOW ENGINES/' $db_file_tmp2 > $db_file_tmp3
sed "63i ${fix_mage}" $db_file_tmp3 > $db_file
rm $db_file_tmp2
rm $db_file_tmp3

#fi
fi

echo "${MAGECIF[2]}Installing Magento...${MAGECIF[0]}"
Expand Down
Loading