Skip to content

Commit

Permalink
Minor provision cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed May 18, 2019
1 parent cc8cd54 commit 0082c77
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions .ci/install-prereqs.sh
Expand Up @@ -19,7 +19,7 @@ PHP_INI="$(phpenv root)/versions/$(phpenv version-name)/etc/php.ini"

: ${ZEPHIR_PARSER_VERSION:=master}

# {{{ Install latest APC(u)
# Install latest APC(u)
printf "\n" | pecl install --force apcu_bc 1> /dev/null
# See https://pear.php.net/bugs/bug.php?id=21007
awk '/extension.*apcu?\.so"?/{$0=""}1' "${PHP_INI}" > php.ini.patch && mv php.ini.patch "${PHP_INI}"
Expand All @@ -31,61 +31,52 @@ extension = "apc.so"
apc.enabled = 1
apc.enable_cli = 1
EOT
# }}}

# {{{ Install latest memcached
# Install latest memcached
printf "\n" | pecl install --force memcached 1> /dev/null
echo 'extension="memcached.so"' > $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/memcached.ini
# }}}

# {{{ Install latest msgpack
# Install latest msgpack
printf "\n" | pecl install --force msgpack 1> /dev/null
#echo 'extension="msgpack.so"' > $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/msgpack.ini
# }}}
# echo 'extension="msgpack.so"' > $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/msgpack.ini

# {{{ Install latest xdebug
# Install latest xdebug
phpenv config-rm xdebug.ini 2>&1 >/dev/null || true
if [[ "$PHP_VERNUM" -lt "70300" ]];
then
if [[ "$PHP_VERNUM" -lt "70300" ]]; then
printf "\n" | pecl install --force xdebug 1> /dev/null
awk '/zend_extension.*xdebug.so"?/{$0=""}1' "${PHP_INI}" > php.ini.patch && mv php.ini.patch "${PHP_INI}"
echo 'zend_extension="xdebug.so"' > $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
fi
# }}}

# {{{ Install latest igbinary, imagick, psr and yaml
# Install latest igbinary, imagick, psr and yaml
printf "\n" | pecl install --force igbinary 1> /dev/null
printf "\n" | pecl install --force imagick 1> /dev/null
printf "\n" | pecl install --force psr 1> /dev/null
printf "\n" | pecl install --force yaml 1> /dev/null
# }}}

# {{{ install zephir_parser
# Install zephir_parser
git clone -b "${ZEPHIR_PARSER_VERSION}" --depth 1 -q https://github.com/phalcon/php-zephir-parser
cd php-zephir-parser
$(phpenv which phpize)
./configure --silent --with-php-config=$(phpenv which php-config) --enable-zephir_parser
make --silent -j"$(getconf _NPROCESSORS_ONLN)"
make --silent install
echo 'extension="zephir_parser.so"' > "$(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/zephir_parser.ini"
# }}}

# {{{ Install redis
# Install redis
redis_ext=`$(phpenv which php-config) --extension-dir`/redis.so
if [[ ! -f "${redis_ext}" ]];
then
if [[ ! -f "${redis_ext}" ]]; then
printf "\n" | pecl install --force redis 1> /dev/null
fi

if [[ "$(php -m | grep redis | wc -l)" = "0" ]] && [[ -f "${redis_ext}" ]];
then
echo 'extension="redis.so"' > "$(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/redis.ini"
fi
# }}}

# Local variables:
# tab-width: 4
# c-basic-offset: 4
# End:
# vim600: noet sw=4 ts=4 fdm=marker
# vim600: noet sw=4 ts=4
# vim<600: noet sw=4 ts=4

0 comments on commit 0082c77

Please sign in to comment.