From da9dadf09c3a919d872d28582d31cc0f6899f660 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Thu, 2 Sep 2021 19:24:08 +0530 Subject: [PATCH] Fix parsing 8.1 version --- src/scripts/common.sh | 2 +- src/scripts/linux.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripts/common.sh b/src/scripts/common.sh index 6c7c38d5..8877f722 100644 --- a/src/scripts/common.sh +++ b/src/scripts/common.sh @@ -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. diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index 99f8f5e9..3f92c156 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -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