Fix to install php-dev on self-hosted env if missing

This commit is contained in:
Shivam Mathur 2022-03-07 08:53:27 +05:30
parent a826799c7c
commit 5e3bc57de0
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -212,7 +212,7 @@ setup_php() {
sudo mkdir -m 777 -p /var/run /run/php sudo mkdir -m 777 -p /var/run /run/php
php_config="$(command -v php-config)" php_config="$(command -v php-config)"
if [[ -z "$php_config" ]] || [ "$(php_semver | cut -c 1-3)" != "$version" ]; then if [[ -z "$php_config" ]] || [ "$(php_semver | cut -c 1-3)" != "$version" ]; then
if [ ! -e "/usr/bin/php$version" ]; then if [ ! -e "/usr/bin/php$version" ] || [ ! -e "/usr/bin/php-config$version" ]; then
add_php >/dev/null 2>&1 add_php >/dev/null 2>&1
else else
if ! [[ "$version" =~ ${old_versions:?} ]]; then if ! [[ "$version" =~ ${old_versions:?} ]]; then