b90c8944b4827ceaa3872e16c006bd1a375015d2

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

archlinux: fix pacmanallkeys URL, make curl silent

Also make all functions local as to not spill variables into the
global namespace.

Diff

 1diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh
 2index ef862f14c8b9082095da5e0590c481e53dc23144..9c8c984b1b930a4a8a90d32393438531d00280a7 100644
 3--- a/plugins/archlinux/archlinux.plugin.zsh
 4+++ b/plugins/archlinux/archlinux.plugin.zsh
 5@@ -68,6 +68,8 @@ paclist() {
 6 }
 7 
 8 pacdisowned() {
 9+  emulate -L zsh
10+
11   tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
12   db=$tmp/db
13   fs=$tmp/fs
14@@ -84,12 +86,14 @@ pacdisowned() {
15 }
16 
17 pacmanallkeys() {
18-  curl https://www.archlinux.org/{developers,trustedusers}/ | \
19+  emulate -L zsh
20+  curl -s https://www.archlinux.org/people/{developers,trustedusers}/ | \
21     awk -F\" '(/pgp.mit.edu/) { sub(/.*search=0x/,""); print $1}' | \
22     xargs sudo pacman-key --recv-keys
23 }
24 
25 pacmansignkeys() {
26+  emulate -L zsh
27   for key in $*; do
28     sudo pacman-key --recv-keys $key
29     sudo pacman-key --lsign-key $key