mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
Merge pull request #94 from shivammathur/develop
Fix phpdbg and improve windows script.
This commit is contained in:
commit
5a081357b4
@ -25,11 +25,15 @@ sudo mkdir -p /run/php
|
|||||||
find /etc/apt/sources.list.d -type f -name 'ondrej-ubuntu-php*.list' -exec sudo DEBIAN_FRONTEND=noninteractive apt-fast update -o Dir::Etc::sourcelist="{}" ';' >/dev/null 2>&1
|
find /etc/apt/sources.list.d -type f -name 'ondrej-ubuntu-php*.list' -exec sudo DEBIAN_FRONTEND=noninteractive apt-fast update -o Dir::Etc::sourcelist="{}" ';' >/dev/null 2>&1
|
||||||
if [ "$existing_version" != "$1" ]; then
|
if [ "$existing_version" != "$1" ]; then
|
||||||
if [ ! -e "/usr/bin/php$1" ]; then
|
if [ ! -e "/usr/bin/php$1" ]; then
|
||||||
|
if [ "$1" != "7.4" ]; then
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$1" curl php"$1"-curl >/dev/null 2>&1
|
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$1" curl php"$1"-curl >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$1" php"$1"-phpdbg php"$1"-xml curl php"$1"-curl >/dev/null 2>&1
|
||||||
|
fi
|
||||||
status="Installed PHP$version"
|
status="Installed PHP$version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for tool in php phar phar.phar php-cgi php-config phpize; do
|
for tool in php phar phar.phar php-cgi php-config phpize phpdbg; do
|
||||||
if [ -e "/usr/bin/$tool$1" ]; then
|
if [ -e "/usr/bin/$tool$1" ]; then
|
||||||
sudo update-alternatives --set $tool /usr/bin/"$tool$1" >/dev/null 2>&1
|
sudo update-alternatives --set $tool /usr/bin/"$tool$1" >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
@ -44,16 +44,7 @@ else {
|
|||||||
|
|
||||||
Set-PhpIniKey -Key 'date.timezone' -Value 'UTC' -Path $php_dir
|
Set-PhpIniKey -Key 'date.timezone' -Value 'UTC' -Path $php_dir
|
||||||
Enable-PhpExtension -Extension openssl, curl -Path $php_dir
|
Enable-PhpExtension -Extension openssl, curl -Path $php_dir
|
||||||
try {
|
|
||||||
Update-PhpCAInfo -Path $php_dir -Source CurrentUser
|
Update-PhpCAInfo -Path $php_dir -Source CurrentUser
|
||||||
}
|
|
||||||
catch {
|
|
||||||
try {
|
|
||||||
Update-PhpCAInfo -Path $php_dir -Source Curl
|
|
||||||
} catch {
|
|
||||||
Update-PhpCAInfo -Path $php_dir -Source Curl -SkipChecksumCheck
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ([Version]$installed.Version -ge '7.4') {
|
if ([Version]$installed.Version -ge '7.4') {
|
||||||
Copy-Item "$dir\..\src\ext\php_pcov.dll" -Destination "$($installed.ExtensionsPath)\php_pcov.dll"
|
Copy-Item "$dir\..\src\ext\php_pcov.dll" -Destination "$($installed.ExtensionsPath)\php_pcov.dll"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user