File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,10 +66,14 @@ update_lists() {
6666
6767# Function to get fingerprint from an Ubuntu PPA.
6868ubuntu_fingerprint () {
69- ppa=$1
70- get -s -n " " " ${lp_api[@]/%// ~${ppa%/* } / +archive/ ${ppa##*/ } } " | jq -r ' .signing_key_fingerprint'
69+ ppa=" $1 "
70+ ppa_uri=" ~${ppa%/* } /+archive/ubuntu/${ppa##*/ } "
71+ get -s -n " " " ${lp_api[0]} /$ppa_uri " | jq -er ' .signing_key_fingerprint' 2> /dev/null \
72+ || get -s -n " " " ${lp_api[1]} /$ppa_uri " | jq -er ' .signing_key_fingerprint' 2> /dev/null \
73+ || get -s -n " " " $ppa_sp /keys/$ppa .fingerprint"
7174}
7275
76+
7377# Function to get fingerprint from a Debian PPA.
7478debian_fingerprint () {
7579 ppa=$1
@@ -93,6 +97,7 @@ add_key() {
9397 sks_params=" op=get&options=mr&exact=on&search=0x$fingerprint "
9498 key_urls=(" ${sks[@]/%/ \/ pks\/ lookup\? " $sks_params " } " )
9599 fi
100+ key_urls+=(" $ppa_sp /keys/$ppa .gpg" )
96101 [ ! -e " $key_source " ] && get -q -n " $key_file " " ${key_urls[@]} "
97102 if [[ " $( file " $key_file " ) " =~ .* (' Public-Key (old)' | ' Secret-Key' ) ]]; then
98103 sudo gpg --batch --yes --dearmor " $key_file " > /dev/null 2>&1 && sudo mv " $key_file " .gpg " $key_file "
You can’t perform that action at this time.
0 commit comments