From da0e8547371daac1784abb79f9bb2af76dcdfaf0 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Wed, 5 Jan 2022 15:18:04 +0530 Subject: [PATCH] Fix phalcon setup on Ubuntu --- src/scripts/ext/phalcon.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/scripts/ext/phalcon.sh b/src/scripts/ext/phalcon.sh index 384beb00..33c23a95 100644 --- a/src/scripts/ext/phalcon.sh +++ b/src/scripts/ext/phalcon.sh @@ -4,11 +4,10 @@ add_phalcon_helper() { if [ "$(uname -s)" = "Darwin" ]; then add_brew_extension "$extension" extension else - if [ "$extension" = "phalcon4" ]; then - install_packages "php${version:?}-psr" "php${version:?}-$extension" - else - install_packages "php${version:?}-$extension" - fi + packages=("php${version:?}-$extension") + [ "$extension" = "phalcon4" ] && packages+=("php${version:?}-psr") + add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php + check_package "${packages[0]}" && install_packages "${packages[@]}" fi }