summaryrefslogtreecommitdiff
path: root/update-me.in
diff options
context:
space:
mode:
Diffstat (limited to 'update-me.in')
-rw-r--r--update-me.in19
1 files changed, 16 insertions, 3 deletions
diff --git a/update-me.in b/update-me.in
index d5b50c1..dd01965 100644
--- a/update-me.in
+++ b/update-me.in
@@ -14,9 +14,22 @@ if [ -d '#ETCDIR#/pacman.d' ]; then
"${postCmds[@]}"
)
fix-pacman-gpg-keyserver-conf() {
- sed -i '
- s@^keyserver hkp://pool\.sks-keyservers\.net$@keyserver hkp://keys.gnupg.net@
- ' '#ETCDIR/pacman.d/gnupg/gpg.conf' '/var/lib/archbuild'/*-build/*/'#ETCDIR/pacman.d/gnupg/gpg.conf' || true
+ for gpg_conf in \
+ '#ETCDIR#/pacman.d/gnupg/gpg.conf' \
+ '/var/lib/archbuild'/*-build/*/'#ETCDIR#/pacman.d/gnupg/gpg.conf'; do
+ [ -f "${gpg_conf}" ] || continue
+ sed -i '
+ \@^keyserver hkp://pool\.sks-keyservers\.net$@ {
+ w /dev/stderr
+ s@^.*$@keyserver hkp://keys.gnupg.net@
+ }
+ ' "${gpg_conf}" 2>&1 | \
+ sed '
+ s/^/"/
+ s@$@" -> "keyserver hkp://keys.gnupg.net"@
+ 1 i modified '"${gpg_conf}"':
+ '
+ done
}
fi