ATuin

Trust Developers and TU for arch repos

Jan 5th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.97 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. ####
  4. ## Little script to trust developer and TU keys from arch team. Needed for pacman 4
  5. ## Usefull if you plan to use that feature.
  6. ##
  7. ## Aitor ATuin
  8. ##
  9. ## Use at your risk :)
  10. ###
  11.  
  12. echo "Trusting developers keys"
  13. for key in `curl https://www.archlinux.org/developers/ 2>/dev/null| awk -F'<' '$0 ~ />0x/ {sub(/^.+>0x/,"",$3);print($3)}'`; do
  14.     echo Importing $key
  15.     /usr/bin/pacman-key --recv-keys $key
  16.     /usr/bin/pacman-key --lsign-key $key
  17.     printf 'trust\n3\nquit\n' | gpg --homedir /etc/pacman.d/gnupg --no-permission-warning --command-fd 0 --edit-key $key
  18. done
  19.  
  20. echo "Trusting TU keys"
  21. for key in `curl https://www.archlinux.org/trustedusers/ 2>/dev/null| awk -F'<' '$0 ~ />0x/ {sub(/^.+>0x/,"",$3);print($3)}'`; do
  22.     echo Importing $key
  23.     /usr/bin/pacman-key --recv-keys $key
  24.     /usr/bin/pacman-key --lsign-key $key
  25.     printf 'trust\n3\nquit\n' | gpg --homedir /etc/pacman.d/gnupg/ --no-permission-warning --command-fd 0 --edit-key $key
  26. done
Advertisement
Add Comment
Please, Sign In to add comment