1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-11 17:01:07 +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 # @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
# #
set -e 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*||")
} }
# redis # $1 - PHP extension name
git clone git://github.com/nicolasff/phpredis.git # $2 - PHP ini file path
cd phpredis function install_php_extension
{
echo "Installing $1 PHP extension"
# See http://www.php.net/manual/en/install.pecl.phpize.php
cd "$1"
phpize phpize
./configure ./configure
make make
make install make install
cd .. cd ..
add_ext_to_php_ini 'redis'
echo "extension=$1.so" >> "$2"
}
php_ini_file=$(find_php_ini)
# redis
git clone git://github.com/nicolasff/phpredis.git redis
install_php_extension 'redis' "$php_ini_file"