Fix parsing 8.1 version

This commit is contained in:
Shivam Mathur 2021-09-02 19:24:08 +05:30
parent e06e40278f
commit da9dadf09c
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 2 additions and 1 deletions

View File

@ -357,7 +357,7 @@ add_composertool() {
# Function to get PHP version in semver format.
php_semver() {
php -v | grep -Eo -m 1 "[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+([0-9]+)?)?" | head -n 1
php -v | grep -Eo -m 1 "[0-9]+\.[0-9]+\.[0-9]+((-?[a-zA-Z]+([0-9]+)?)?){2}" | head -n 1
}
# Function to get the tag for a php version.

View File

@ -207,6 +207,7 @@ setup_php() {
scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||")
ini_dir=$(php --ini | grep "(php.ini)" | sed -e "s|.*: s*||")
pecl_file="$scan_dir"/99-pecl.ini
export ext_dir
mapfile -t ini_file < <(sudo find "$ini_dir/.." -name "php.ini" -exec readlink -m {} +)
link_pecl_file
configure_php