mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Add dependencies when enabling extensions in linux
This commit is contained in:
parent
48cfea3f3e
commit
88c7757dc8
@ -54,6 +54,8 @@ add_extension() {
|
|||||||
install_command=$2
|
install_command=$2
|
||||||
prefix=$3
|
prefix=$3
|
||||||
if ! php -m | grep -i -q -w "$extension" && [ -e "$ext_dir/$extension.so" ]; then
|
if ! php -m | grep -i -q -w "$extension" && [ -e "$ext_dir/$extension.so" ]; then
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
$apt_install $(apt-cache depends php"$version"-"$extension" | awk '/Depends:/{print$2}') >/dev/null 2>&1
|
||||||
echo "$prefix=$extension" >>"$ini_file" && add_log "$tick" "$extension" "Enabled"
|
echo "$prefix=$extension" >>"$ini_file" && add_log "$tick" "$extension" "Enabled"
|
||||||
elif php -m | grep -i -q -w "$extension"; then
|
elif php -m | grep -i -q -w "$extension"; then
|
||||||
add_log "$tick" "$extension" "Enabled"
|
add_log "$tick" "$extension" "Enabled"
|
||||||
|
Loading…
Reference in New Issue
Block a user