equal
deleted
inserted
replaced
|
1 #!/usr/bin/perl |
|
2 |
|
3 use strict; |
|
4 use File::Find; |
|
5 |
|
6 my $incoming = "/home/apt/incoming"; |
|
7 |
|
8 my @unsigned = qw( |
|
9 |
|
10 freeradius_1.0.0+cvs20040609-0.hs.5_i386.changes |
|
11 |
|
12 ); |
|
13 |
|
14 my $vc = "gpg --verify"; |
|
15 my $cc = "gpg --clearsign"; |
|
16 |
|
17 for (@unsigned) { |
|
18 |
|
19 my $f = "$incoming/$_"; |
|
20 |
|
21 # since we use a fixed list of unsigned files we shouldnt sign them twice |
|
22 my $r = qx/$vc $f 2>&1/; |
|
23 next unless $?; |
|
24 |
|
25 print "Attempting to sign [$f] .. "; |
|
26 system("$cc $f") == 0 or warn "system([$cc] [$f]) failed: [$?] [$!]\n"; |
|
27 rename("$f.asc", $f) or warn "rename([$f.asc], [$f]) failed: [$!]\n"; |
|
28 print "finished\n"; |
|
29 |
|
30 } |