From 116ff19185fd50a30abdc04a8200c330589088d4 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 3 Feb 2014 22:09:33 +0100 Subject: [ticket/11985] Rename install -> setup. This is more generic and consistent. PHPBB3-11985 --- travis/install-php-extensions.sh | 50 ---------------------------------------- travis/setup-php-extensions.sh | 50 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 50 deletions(-) delete mode 100755 travis/install-php-extensions.sh create mode 100755 travis/setup-php-extensions.sh (limited to 'travis') diff --git a/travis/install-php-extensions.sh b/travis/install-php-extensions.sh deleted file mode 100755 index 18d6e7e09d..0000000000 --- a/travis/install-php-extensions.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# -# @copyright (c) 2013 phpBB Group -# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 -# -set -e -set -x - -function find_php_ini -{ - echo $(php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||") -} - -# $1 - PHP extension name -# $2 - PHP ini file path -function register_php_extension -{ - echo "extension=$1.so" >> "$2" -} - -# $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 .. - - register_php_extension "$1" "$2" -} - -php_ini_file=$(find_php_ini) - -# apc -if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.5.0-dev', '<');"` == "1" ] -then - echo 'Enabling APC PHP extension' - register_php_extension 'apc' "$php_ini_file" - echo 'apc.enable_cli=1' >> "$php_ini_file" -fi - -# redis -git clone git://github.com/nicolasff/phpredis.git redis -install_php_extension 'redis' "$php_ini_file" diff --git a/travis/setup-php-extensions.sh b/travis/setup-php-extensions.sh new file mode 100755 index 0000000000..18d6e7e09d --- /dev/null +++ b/travis/setup-php-extensions.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# +# @copyright (c) 2013 phpBB Group +# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +# +set -e +set -x + +function find_php_ini +{ + echo $(php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||") +} + +# $1 - PHP extension name +# $2 - PHP ini file path +function register_php_extension +{ + echo "extension=$1.so" >> "$2" +} + +# $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 .. + + register_php_extension "$1" "$2" +} + +php_ini_file=$(find_php_ini) + +# apc +if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.5.0-dev', '<');"` == "1" ] +then + echo 'Enabling APC PHP extension' + register_php_extension 'apc' "$php_ini_file" + echo 'apc.enable_cli=1' >> "$php_ini_file" +fi + +# redis +git clone git://github.com/nicolasff/phpredis.git redis +install_php_extension 'redis' "$php_ini_file" -- cgit v1.2.1