summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-01 06:15:19 +0200
committerErich Eckner <git@eckner.net>2019-07-01 06:15:19 +0200
commit6009497eb8a9a99457a71c0bee6982583d8c547c (patch)
treead23cb1db925c40f186fbd1164c3cf434d9f7faf
parent1328a54e02a9f7f84551ea5fc81258fb7f8082bf (diff)
downloadupdate-all-6009497eb8a9a99457a71c0bee6982583d8c547c.tar.xz
update-me.in: fix type, be more verbose on editing
-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