chiark / gitweb /
actually do version protocol; use tempfile to stop exec truncating our binary ppm
[ypp-sc-tools.db-live.git] / pctb / commod-results-processor
index cea64e5190318e437c5ad55ff6368cfe0f8a68ed..e391e4749780c1a04e50abfc4f146a4317a3b771 100755 (executable)
@@ -244,7 +244,7 @@ sub refresh_commodmap() {
     my $incommodmap=0;
     my $intag='';
     my %got;
-    my $o= new IO::File "#commodmap#.tsv.new",'w' or die $!;
+    my $o= new IO::File "#commodmap#.tsv.tmp",'w' or die $!;
     undef %commodmap;
 
     my $xp= new XML::Parser
@@ -292,7 +292,7 @@ sub refresh_commodmap() {
 #    print STDERR "[[[$content]]]\n";
     $xp->parse($content);
     close $o or die $!;
-    rename "#commodmap#.tsv.new","#commodmap#.tsv" or die $!;
+    rename "#commodmap#.tsv.tmp","#commodmap#.tsv" or die $!;
 }
 
 our %newcommods;
@@ -449,7 +449,7 @@ sub main__upload () {
                          ]
                      };
 
-    print STDERR "Uploading data to server...\n";
+    print STDERR "Uploading data to $pctb...\n";
 
     my $resp= $ua->post("$url", Content => $content,
                        Content_Type => 'form-data');