Fix warning in cleanup_lists on first run on ubuntu-20.04

This commit is contained in:
Shivam Mathur 2020-07-21 18:27:07 +05:30
parent 9e22b87414
commit c549015370
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -30,7 +30,7 @@ cleanup_lists() {
if [ ! -e /etc/apt/sources.list.d.save ]; then if [ ! -e /etc/apt/sources.list.d.save ]; then
sudo mv /etc/apt/sources.list.d /etc/apt/sources.list.d.save sudo mv /etc/apt/sources.list.d /etc/apt/sources.list.d.save
sudo mkdir /etc/apt/sources.list.d sudo mkdir /etc/apt/sources.list.d
sudo mv /etc/apt/sources.list.d.save/*ondrej*.list /etc/apt/sources.list.d/ sudo mv /etc/apt/sources.list.d.save/*ondrej*.list /etc/apt/sources.list.d/ || true
trap "sudo mv /etc/apt/sources.list.d.save/*.list /etc/apt/sources.list.d/" exit trap "sudo mv /etc/apt/sources.list.d.save/*.list /etc/apt/sources.list.d/" exit
fi fi
} }