Skip to content

Fix multi-extension handling #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions scripts/extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ set -e

function install_extensions {
local PHP=$1
local -a EXTENSIONS=("${@:2}")
local -a EXTENSIONS=()
for EXTENSION in "${@:2}"; do
EXTENSIONS+=("$EXTENSION")
done

case "$PHP" in
8.1)
Expand All @@ -25,7 +28,11 @@ function install_extensions {

function install_packaged_extensions {
local PHP=$1
local -a EXTENSIONS=("${@:2}")
# shellcheck disable=SC2206
local -a EXTENSIONS=()
for EXTENSION in "${@:2}"; do
EXTENSIONS+=("$EXTENSION")
done
local TO_INSTALL=""

for EXTENSION in "${EXTENSIONS[@]}"; do
Expand All @@ -52,7 +59,8 @@ function enable_static_extension {
}

PHP=$1
declare -a EXTENSIONS=("${@:2}")
# shellcheck disable=SC2206
declare -a EXTENSIONS=(${@:2})
# shellcheck disable=SC2196
ENABLED_EXTENSIONS=$(php -m | tr '[:upper:]' '[:lower:]' | egrep -v '^[\[]' | grep -v 'zend opcache')
EXTENSIONS_TO_INSTALL=()
Expand Down