bin/sign-unsigned-changes
branchrsync
changeset 29 677e250ac544
parent 28 8efaf6179ee8
child 30 0cf878dc81be
equal deleted inserted replaced
28:8efaf6179ee8 29:677e250ac544
     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 }