mirror of
				https://github.com/shivammathur/setup-php.git
				synced 2025-10-31 07:16:22 +07:00 
			
		
		
		
	Hotfix after phalcon4 release
This commit is contained in:
		| @ -1,8 +1,10 @@ | ||||
| ini_file=$(php --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g") | ||||
| ini_dir=$(php --ini | grep in: | sed -e "s|.*:s*||" | sed "s/ //g") | ||||
| if [ ! "$(apt-cache search php"$2"-psr)" ]; then | ||||
|   sudo DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:ondrej/php -y >/dev/null 2>&1 | ||||
| fi | ||||
| sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-dev php"$2"-psr | ||||
| sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-dev | ||||
| sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-psr | ||||
| for tool in php-config phpize; do | ||||
|   if [ -e "/usr/bin/$tool$2" ]; then | ||||
|     sudo update-alternatives --set $tool /usr/bin/"$tool$2" | ||||
| @ -17,10 +19,6 @@ if [ ! "$(apt-cache search php"$2"-psr)" ]; then | ||||
|   echo "extension=psr.so" >> "$ini_file" | ||||
| fi | ||||
|  | ||||
| if [ "$1" = "master" ]; then | ||||
|   sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-phalcon | ||||
| else | ||||
|   cd ~ && git clone --depth=1 -v https://github.com/phalcon/cphalcon.git -b "$1" | ||||
|   cd cphalcon/build && sudo ./install --phpize /usr/bin/phpize"$2" --php-config /usr/bin/php-config"$2" | ||||
|   echo "extension=phalcon.so" >> "$ini_file" | ||||
| fi | ||||
| cd ~ && git clone --depth=1 -v https://github.com/phalcon/cphalcon.git -b "$1" | ||||
| cd cphalcon/build && sudo ./install --phpize /usr/bin/phpize"$2" --php-config /usr/bin/php-config"$2" | ||||
| echo "extension=phalcon.so" | sudo tee "$ini_dir/50-phalcon.ini" | ||||
		Reference in New Issue
	
	Block a user
	 Shivam Mathur
					Shivam Mathur