#!/bin/sh -e

if [ "$(expr "$TRAVIS_PHP_VERSION" "<" "5.5")" -eq 1 ]; then
	echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
	echo "apc.enable_cli = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
else
	echo "Not installing APC as it is not available in PHP 5.5 anymore."
fi
#!/bin/sh -e

if [ "$(expr "$TRAVIS_PHP_VERSION" "<" "5.5")" -eq 1 ]; then
	yes '' | pecl install apc
	#echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
	echo "apc.enable_cli = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
else
	echo "Not installing APC as it is not available in PHP 5.5 anymore."
fi

Install APC on Ubuntu trusty
Install APC on Ubuntu trusty

Trusty does not have APC preinstalled (see
https://github.com/travis-ci/travis-ci/issues/5618,
https://github.com/travis-ci/travis-ci/issues/6853) so we need to
install it manually using PECL. `yes ''` allows to skip prompts and fill
it with default values.
