OBS User unknown 2008-09-19 07:37:38 +00:00 committed by Git OBS Bridge
parent 058a21cab2
commit 242e50b605

View File

@ -1,42 +0,0 @@
#!/usr/bin/perl
my $keyring='';
$keyring="--no-default-keyring --keyring=$ARGV[0]" if $ARGV[0] ne '';
my @line;
my $ver;
my $rel;
my $name;
open(GPG, "gpg $keyring --no-secmem-warning --list-sigs --list-options show-keyring --fixed-list-mode --with-colons |");
while (<GPG>) {
chomp;
next unless /^pub:/;
@line = split(':', $_);
my $id = $line[4];
$_ = <GPG>;
chomp;
next unless /^uid:/;
@line = split(':', $_);
$name = $line[9];
while (1) {
$_ = <GPG>;
chomp;
die unless /^sig:/;
@line = split(':', $_);
next if $line[4] ne $id;
$ver = lc($id);
$ver =~ s/.*(........)$/$1/;
$rel = sprintf("%08x", $line[5]);
last;
}
$names{"gpg-pubkey-$ver-$rel"} = $id;
}
close GPG;
my $n;
for $n (sort keys %names) {
print "writing $n.asc\n";
system("gpg $keyring --no-secmem-warning --export -a '$names{$n}' >$n.asc");
}