Skip to content

Instantly share code, notes, and snippets.

@f99aq8ove
Created January 31, 2009 05:00
Show Gist options
  • Save f99aq8ove/55443 to your computer and use it in GitHub Desktop.
Save f99aq8ove/55443 to your computer and use it in GitHub Desktop.
get launchpad PPA's keys
#!/bin/sh
for i in `perl -nle'print "https://launchpad.net/~$1/+archive/ppa" if m!deb\s+http://ppa\.launchpad\.net/(.+?)/!' /etc/apt/sources.list`; do
wget -q -O- "`wget -q -O- "$i" | perl -nle'print "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x$1" if m!"http://keyserver.ubuntu.com:11371/pks/lookup\?search=.+?([[:xdigit:]]{16})&!'`" | sudo apt-key add -
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment