Optimize Linux and macOS setup

This commit is contained in:
Shivam Mathur
2022-01-18 08:44:46 +05:30
parent 2b729b1130
commit 2ee6797b63
3 changed files with 20 additions and 11 deletions

View File

@ -147,6 +147,11 @@ php_semver() {
grep -Eo 'version="[0-9]+(\.[0-9]+){2}((-?[a-zA-Z]+([0-9]+)?)?){2}' "${php_config:?}" | cut -d '"' -f 2
}
# Function to get ini_path.
php_ini_path() {
cut -d '"' -f 2 < <(grep "ini_path=" "$php_config" || php --ini | grep '(php.ini)' | sed -e "s|.*: s*||")
}
# Function to get the tag for a php version.
php_src_tag() {
commit=$(php_extra_version | grep -Eo "[0-9a-zA-Z]+")