From e6e79e1717be539bc684161192d09f9a981f6fd1 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Mon, 3 Jan 2022 03:20:24 +0530 Subject: [PATCH] Refactor PHP packages to a config --- src/configs/php_packages | 6 ++++++ src/scripts/linux.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/configs/php_packages diff --git a/src/configs/php_packages b/src/configs/php_packages new file mode 100644 index 00000000..aa072853 --- /dev/null +++ b/src/configs/php_packages @@ -0,0 +1,6 @@ +cli +curl +dev +intl +mbstring +xml diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index 996ed977..59a300b2 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -128,7 +128,7 @@ switch_version() { add_packaged_php() { if [ "$runner" = "self-hosted" ] || [ "${use_package_cache:-true}" = "false" ]; then add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php - IFS=' ' read -r -a packages <<<"$(echo "cli curl dev mbstring xml intl" | sed "s/[^ ]*/php$version-&/g")" + IFS=' ' read -r -a packages <<<"$(sed "s/[^ ]*/php$version-&/g" "$dist"/../src/configs/php_packages | tr '\n' ' ')" install_packages "${packages[@]}" else run_script "php-ubuntu" "$version"