Fix debug support on Linux

This commit is contained in:
Shivam Mathur 2022-10-24 10:28:08 +05:30
parent 98e3af0bff
commit d2efbcd126
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 3 additions and 3 deletions

View File

@ -76,8 +76,8 @@ check_package() {
add_extension_helper() { add_extension_helper() {
local extension=$1 local extension=$1
packages=(php"$version"-"$extension") 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 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" (check_package "${packages[0]}" && install_packages "${packages[@]}") || pecl_install "$extension"
add_extension_log "$extension" "Installed and enabled" add_extension_log "$extension" "Installed and enabled"
sudo chmod 777 "${ini_file[@]}" sudo chmod 777 "${ini_file[@]}"

View File

@ -153,11 +153,11 @@ add_ppa() {
set_base_version set_base_version
ppa=${1:-ondrej/php} ppa=${1:-ondrej/php}
if [[ "$ID" = "ubuntu" || "$ID_LIKE" =~ ubuntu ]] && [[ "$ppa" =~ "ondrej/" ]]; then 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" [ "${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 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" [ "${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 else
add_list "$ppa" add_list "$ppa"
fi fi