Created
February 27, 2015 09:00
-
-
Save scalopus/d9445c980b41b722634c to your computer and use it in GitHub Desktop.
php-build-common-config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 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]\+\$::'` | |
COMMON_DIR="$COMMON_DIR_PREFIX.0" | |
if [ "$PHP_MINOR" == "0" ]; then | |
echo "Major version...."; | |
exit 0; | |
fi | |
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