chiark / gitweb /
WIP Much rework for new upload arrangements and new name
[ypp-sc-tools.main.git] / yarrg / commod-results-processor
index 827cac45ebfc05ac9a5a628d15437d758a93de07..7cd4e0457b6f438398ffa55f46dcdb035d834ed7 100755 (executable)
@@ -310,17 +310,8 @@ sub read_newcommods ($) {
 }
 
 sub refresh_newcommods() {
-    my $rsync= $ENV{'YPPSC_YARRG_RSYNC'};
-    $rsync= 'rsync' if !defined $rsync;
-
-    my $local= "_master-newcommods.txt";
-    my $src= $ENV{'YPPSC_YARRG_DICT_UPDATE'};
-    if ($src) {
-       my $remote= "$src/master-newcommods.txt";
-       $!=0; system 'rsync','-Lt','--',$remote,$local;
-       die "$? $!" if $! or $?;
-    }
-    read_newcommods($local);
+    my $master= fetch_with_rsync('newcommods');
+    read_newcommods($master);
     read_newcommods('_local-newcommods.txt');
 }
 
@@ -440,6 +431,9 @@ sub gzip ($) {
 
 sub main__uploadyaarg () {
     my %o;
+
+    parse_info_clientside();
+
     $o{'ocean'}= $ENV{'YPPSC_OCEAN'} or die;
     $o{'island'}= $ENV{'YPPSC_ISLAND'} or die;
     $o{'timestamp'}= 10;
@@ -452,7 +446,7 @@ sub main__uploadyaarg () {
                    Content_Type => 'application/octet-stream',
                    Content => $oz ];
 
-    my $dest= $ENV{'YPPSC_YAARG_SUBMIT'};
+    my $dest= $ENV{'YPPSC_YARRG_YARRG'};
 
     my $respcontent= cgipostform($ua, "$dest/commod-update-receiver", \%o);
     $respcontent =~ m/^OK\b/ or die "$respcontent ?";