Skip to content

Commit

Permalink
Improve support for deb822 system sources file
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Apr 27, 2024
1 parent 18975ec commit 868f02c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/scripts/tools/ppa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ update_lists() {
if [[ -n "$ppa" && -n "$ppa_search" ]]; then
list="$list_dir"/"$(basename "$(grep -lr "$ppa_search" "$list_dir")")"
status_file=/tmp/"${ppa/\//_}"
elif [ -e "$list_file" ] && grep -Eq '^deb ' "$list_file"; then
elif [ -e "$list_file" ] && grep -Eq '^deb |^Types deb' "$list_file"; then
list="$list_file"
fi
if [ ! -e "$status_file" ]; then
Expand Down Expand Up @@ -189,8 +189,9 @@ update_ppa() {
}

# Variables
list_file='/etc/apt/sources.list'
list_dir="$list_file.d"
list_dir='/etc/apt/sources.list.d'
list_file="/etc/apt/sources.list.d/$ID.sources"
[ -e "$list_file" ] || list_file='/etc/apt/sources.list'
upstream_lsb='/etc/upstream-release/lsb-release'
lp_api='https://api.launchpad.net/1.0'
lp_ppa='http://ppa.launchpad.net'
Expand Down

0 comments on commit 868f02c

Please sign in to comment.