From d2efbcd1260f45b70463498bcfdb633ec1c218eb Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Mon, 24 Oct 2022 10:28:08 +0530 Subject: [PATCH] Fix debug support on Linux --- src/scripts/linux.sh | 2 +- src/scripts/tools/ppa.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index 7b8c6b49..9f52be22 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -76,8 +76,8 @@ check_package() { add_extension_helper() { local extension=$1 packages=(php"$version"-"$extension") - [ "${debug:?}" = "debug" ] && check_package php"$version"-"$extension"-dbgsym && packages+=(php"$version"-"$extension"-dbgsym) add_ppa ondrej/php >/dev/null 2>&1 || update_ppa ondrej/php + [ "${debug:?}" = "debug" ] && check_package php"$version"-"$extension"-dbgsym && packages+=(php"$version"-"$extension"-dbgsym) (check_package "${packages[0]}" && install_packages "${packages[@]}") || pecl_install "$extension" add_extension_log "$extension" "Installed and enabled" sudo chmod 777 "${ini_file[@]}" diff --git a/src/scripts/tools/ppa.sh b/src/scripts/tools/ppa.sh index 65662883..47e24538 100644 --- a/src/scripts/tools/ppa.sh +++ b/src/scripts/tools/ppa.sh @@ -153,11 +153,11 @@ add_ppa() { set_base_version ppa=${1:-ondrej/php} if [[ "$ID" = "ubuntu" || "$ID_LIKE" =~ ubuntu ]] && [[ "$ppa" =~ "ondrej/" ]]; then - add_list "$ppa" [ "${debug:?}" = "debug" ] && add_list "$ppa" "$lp_ppa/$ppa/ubuntu" "$lp_ppa/$ppa/ubuntu" "$VERSION_CODENAME" "main/debug" + add_list "$ppa" elif [[ "$ID" = "debian" || "$ID_LIKE" =~ debian ]] && [[ "$ppa" =~ "ondrej/" ]]; then - add_list "$ppa" "$sury"/"${ppa##*/}"/ "$sury"/"${ppa##*/}"/apt.gpg [ "${debug:?}" = "debug" ] && add_list "$ppa" "$sury"/"${ppa##*/}"/ "$sury"/"${ppa##*/}"/apt.gpg "$VERSION_CODENAME" "main/debug" + add_list "$ppa" "$sury"/"${ppa##*/}"/ "$sury"/"${ppa##*/}"/apt.gpg else add_list "$ppa" fi