Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Copy this file to ./php-build/share/php-build/after-install.d
# This file is to keep all minors version use the same configuration file.
# This will required you to install the base version.
# Ex.
# 5.4.10 use 5.4.0 as configuration
# you have to install 5.4.0 at first.
PHP_MINOR=`echo $PREFIX | sed 's:.*/::' | sed 's:[0-9]\.[0-9]\.::'`
COMMON_DIR_PREFIX=`echo $PREFIX | sed 's:\.[0-9]\+\$::'`
if [ "$PHP_MINOR" == "0" ]; then
echo "Major version....";
exit 0;
echo "Going to make hard link to directory $COMMON_DIR"
mv $PREFIX/etc/php.ini $PREFIX/etc/php.ini.original
mv $PREFIX/etc/conf.d/xdebug.ini $PREFIX/etc/conf.d/xdebug.ini.original
ln -s $COMMON_DIR/etc/php.ini $PREFIX/etc/php.ini
ln -s $COMMON_DIR/etc/conf.d/xdebug.ini $PREFIX/etc/conf.d/xdebug.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment