Bonjour,

Bon, j'ai pas pu résister plus longtemps, alors voici la nouvelle
version.

changelog :
version 0.3.1
  - change: warning if `apt-cache' not found, continue with `noname-' file
  - bug fix:
    - output statistics if there are only `todo' files

La rustine est jointe, le script complet toujours là :
http://perso.wanadoo.fr/nico.bertol/ddts/ddts-script.txt


Nicolas
-- 
--- ddts-script_0.3.txt Mon Dec  3 16:17:10 2001
+++ ddts-script_0.3.1.txt       Sun Dec  9 12:38:47 2001
@@ -268,7 +268,7 @@
 
 =cut
 
-my $version = "0.3";
+my $version = "0.3.1";
 
 # Test if configuration as been made
 foreach ($tr_dir, $bug_dir, $rev_dir, $temp_dir) {
@@ -550,10 +550,13 @@
        $debug==2 && print "short description: $short\n";
        $debug>3  && print "    short:        $short\n";
 
-       open  APT, "apt-cache search '$short' |"        || die "Unable to run 
apt-cache: $!";
-       chomp ($name = <APT> || "");
-       close APT                                       || die "Unable to run 
apt-cache: $!";
-       $name =~ s/ .*$//;                      # keep the package name
+       if (open  APT, "apt-cache search '$short' |") {
+               chomp ($name = <APT> || "");
+               close APT                                       || die "Unable 
to run apt-cache: $!";
+               $name =~ s/ .*$//;                      # keep the package name
+       } else {
+               warn "Unable to run apt-cache: maybe you are not on a Debian 
system!";
+       }
        if ($name ne "") {
                $debug   && $debug<3 && print "I guess `$short' referes to 
`$name'\n";
                $debug>2 &&             print "    package:      $name\n";
@@ -1360,7 +1363,7 @@
        my $l = 0;
           $l = $_>$l?$_:$l foreach ($sumtr, $sumbug, $sumrev);
           $l = length $l;
-       if ($sumtr) {
+       if ($sumtr + $totr_c) {
                print  "===== translations\n";
                printf "     to do: %${l}d\n",    $totr_c;
                printf "   to send: %${l}d\n",     $tr_c;
@@ -1378,7 +1381,7 @@
                printf "    bugged: %${l}d\n", $sumbug;
        }
 
-       if ($sumrev) {
+       if ($sumrev + $torev_c) {
                print  "===== reviews\n";
                printf "     to do: %${l}d\n",   $torev_c;
                printf "   to send: %${l}d\n",     $rev_c;

Répondre à