Skip to content

Commit

Permalink
Fix adding debug package lists
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Nov 4, 2024
1 parent cf36231 commit 51383ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scripts/tools/ppa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ update_lists() {
status_file=/tmp/os_lists
if [[ -n "$ppa" && -n "$ppa_search" ]]; then
list="$list_dir"/"$(basename "$(grep -lr "$ppa_search" "$list_dir")")"
status_file=/tmp/"${ppa/\//_}"
status_file=/tmp/"$(echo -n "$ppa_search" | shasum -a 256 | cut -d ' ' -f 1)"
elif [ -e "$list_file" ] && grep -Eq '^deb |^Types deb' "$list_file"; then
list="$list_file"
fi
Expand Down Expand Up @@ -121,7 +121,7 @@ add_list() {
key_source=${3:-"$ppa_url"}
package_dist=${4:-"$VERSION_CODENAME"}
branches=${5:-main}
ppa_search="deb .*$ppa_url $package_dist .*$branches"
ppa_search="deb .*$ppa_url $package_dist .*$branches$"
if check_lists "$ppa" "$ppa_search"; then
echo "Repository $ppa already exists";
return 1;
Expand All @@ -142,7 +142,7 @@ check_ppa() {
ppa_url=${2:-"$lp_ppa/$ppa/ubuntu"}
package_dist=${3:-"$VERSION_CODENAME"}
branches=${4:-main}
ppa_search="deb .*$ppa_url $package_dist .*$branches"
ppa_search="deb .*$ppa_url $package_dist .*$branches$"
if check_lists "$ppa" "$ppa_search"; then
return 0;
else
Expand Down

0 comments on commit 51383ec

Please sign in to comment.