mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Improve updating lists
This commit is contained in:
parent
5b2e081bc0
commit
19497a0597
@ -29,6 +29,7 @@ cleanup_lists() {
|
||||
# Function to update php ppa
|
||||
update_lists() {
|
||||
if [ "$lists_updated" = "false" ]; then
|
||||
cleanup_lists
|
||||
sudo "$debconf_fix" apt-get update >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
@ -262,7 +263,10 @@ step_log "Setup PHP"
|
||||
sudo mkdir -p /var/run /run/php
|
||||
. /etc/lsb-release
|
||||
if [ "$DISTRIB_RELEASE" = "20.04" ]; then
|
||||
LC_ALL=C.UTF-8 sudo apt-add-repository ppa:ondrej/php -y
|
||||
if ! apt-cache policy | grep -q ondrej/php; then
|
||||
cleanup_lists
|
||||
LC_ALL=C.UTF-8 sudo apt-add-repository ppa:ondrej/php -y
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$existing_version" != "$version" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user