1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-13 20:32:11 +02:00

[ticket/11985] Reorganise travis/install-php-extensions.sh

PHPBB3-11985
This commit is contained in:
Andreas Fischer 2014-01-27 01:17:26 +01:00
parent 1f93d940fd
commit a012293462

View File

@ -4,18 +4,32 @@
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
#
set -e
set -x
function add_ext_to_php_ini
function find_php_ini
{
echo "extension=$1.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
echo $(php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||")
}
# $1 - PHP extension name
# $2 - PHP ini file path
function install_php_extension
{
echo "Installing $1 PHP extension"
# See http://www.php.net/manual/en/install.pecl.phpize.php
cd "$1"
phpize
./configure
make
make install
cd ..
echo "extension=$1.so" >> "$2"
}
php_ini_file=$(find_php_ini)
# redis
git clone git://github.com/nicolasff/phpredis.git
cd phpredis
phpize
./configure
make
make install
cd ..
add_ext_to_php_ini 'redis'
git clone git://github.com/nicolasff/phpredis.git redis
install_php_extension 'redis' "$php_ini_file"